- 🇧🇪Belgium swentel
With the current code, it does seem to work, but I'm going to double check everything and change the default behavior or suggestions also to match core (with BC layer)
- Status changed to Fixed
12 months ago 11:52am 29 December 2023 - 🇦🇺Australia dpi Perth, Australia
Created a issue which seems to be caused by the merge of this issue: 🐛 Missing template suggestions after upgrading to 3.17 RTBC
- 🇵🇭Philippines bryanmanalo
Should this be re-opened?
https://git.drupalcode.org/project/ds/-/commit/833693cd386bd111eff81c008...
This particular commit still contains a single hyphen.
https://www.drupal.org/project/drupal/issues/3343198 🐛 Improve documentation of hook_theme_suggestions_HOOK_alter() Fixed will mark suggestions with a single hyphen as invalid.
- 🇧🇪Belgium swentel
Afaict it should be fine, the double hyphen is particularly necessary for the hook, the others are fine normally - even though we could have been consistent, that's something else :). Otherwise I would have seen this already I think since that issue is in 10.1 already
- 🇵🇭Philippines bryanmanalo
Sorry I misunderstood the issue.
In my case, the problem was the ds setting "layout_suggestion_bc". If this is set to TRUE, layout--onecol--node-video.html is not recognized, and it looks for layout-onecol--node-video. However, this is flagged by Drupal as invalid.
<!-- INVALID FILE NAME SUGGESTIONS: See https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Render!theme.api.php/function/hook_theme_suggestions_alter layout_onecol__node__200526 layout_onecol__node_video_teaser layout_onecol__node_video layout_onecol__node_teaser layout_onecol__node -->
It might be helpful for others, this is the setting. Disable this if you are facing the same issue.
On a side note, why is there a hook_update_N to turn this ON by default?
- 🇧🇪Belgium swentel
The update hook was not to break things unexpectedly when upgrading DS on existing sites since the code was potentially a breaking change at the time this was committed. Even though the impact is relatively small, it would be a subtle bug which you wouldn't necessarily see immediately.
I'm planning more fundamental changes in code regarding templates etc, but it's good practice to always ship with a BC layer for upgrades -even for our own projects at work :)