- 🇩🇪Germany Anybody Porta Westfalica
Might this be caused by 🐛 Incorrect order and duplicate theme hook suggestions Needs work ?
Layout discovery doesn't load layout suggestions unless the layout definition is prefixed with layout__
and the template with layout--
.
This break any existing site using the (deprecated) Layouts → contrib module, where the prefixing wasn't necessary.
Additionally site-builders and developers get confused as twig debug comments suggest wrong [as in: not-prefixed] template suggestions names, i.e. (from: #2905197: Template override is not working → ):
layouts definitions file: naurodvolleys.layouts.yml
naurodvolleys_1x1:
label: "naurodvolleys 1x1"
category: "naurodvolleys"
template: "templates/content-layout/naurodvolleys_1x1"
regions:
main:
label: "Main"
Template suggestions:
Target suggestion: naurodvolleys-1x1--node-result-1x1.html.twig
Suggestion is not loaded.
For further investigation you can read #2862683: 'base hook' key prevents template suggestions from working → comments from #25 → on going.
@tim.plunkett on #9 confirmed this is actually a bug, themes and modules layout templates suggestions needs to be loaded in accordance with their definitions.
This is a pure code change, so no UI changes expected.
There may be Layout API changes, depending what the result of task 1) will be.
Needs work
11.0 🔥
The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Might this be caused by 🐛 Incorrect order and duplicate theme hook suggestions Needs work ?