Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When viewing a layout in Umami profile (even with Bartik as theme) then the pencil icon to modify already placed blocks does not show up.
I'm tagging this as layout.module issue initially in case someone thinks it might have wider implications than Umami.
Comment | File | Size | Author |
---|---|---|---|
#8 | layout-builder-twig.jpg | 59.69 KB | imclean |
Comments
Comment #2
jonathanshawComment #3
tim.plunkettThe pencil icon is a standard use of contextual module, which LB is dependent on. There is no custom code in LB to support that.
Comment #4
larowlanmost likely the block template isn't outputting the title_prefix variable
Comment #5
Eli-TBumping to 8.6.x-dev as layout builder is experimental in 8.5.x
Comment #6
tim.plunkettIt's experimental in 8.6 as well.
And as I said before, this seems to be related to contextual links, not Layout Builder.
Comment #7
finnsky CreditAttribution: finnsky at Skilld commentedI checked this issue from different sides.
Contextual links and layout builder is ok on my side: https://gyazo.com/fd4e4a73df307c1d4ef48ca4a1d10402
But right now when LB enabled in umami we have regression because of twig templates. For example in
http://cgit.drupalcode.org/drupal/tree/core/profiles/demo_umami/themes/u... twig needs {{ content.field_preparation_time }}
but $variables['content'] is changed by LB to: https://i.gyazo.com/f9892c3b6c3f88d736d3e6149e57cd54.png
And this issue mostly in all twig templates.
Recipe: https://gyazo.com/192b7b6cca63bc7acd9ca0e9c52ca665
Banner block without image: https://gyazo.com/aacedad70f068ef45502f9de27e2782e
Articles: https://gyazo.com/2241c75fc75464be65e26143788a2ec0
and etc.
After disqussion with @tim.plunkett we have 3 options now:
1) Update twig templates. To use
via preprocess something like:
or disable usage of twig in case of LB enabled.
2) Add LB dependency for umami, remove twig templating. and manage layouts in its way. Isn't umami demonstrate drupal features? If yes LB would be good example.
3) Finally, https://www.drupal.org/project/drupal/issues/2936358 will allow for certain parts to opt-in or out of LB. So we can disable LB by default in demonstrate.
For me 2nd way seems most interesting.
Comment #8
imclean CreditAttribution: imclean commented#7 @finnsky,
It can be worse than that. This is what I'm seeing:
The content array isn't indexed by field name.
Comment #9
markconroy CreditAttribution: markconroy as a volunteer and at Annertech commentedI'm going to mark this as postponed for now.
We are not supporting experimental modules as part of OOTB (it's why we didn't implement image fields as media fields while media was experimental in Drupal Core). Once LB is stable in core (or very nearly there) we can look at this then. Feel free to continue working on it, but it will not be a priority of the OOTB maintainers for a little while more.
I've attached a new tag 'Umami new feature' that we can use for revisiting these type issues as their modules are approaching stable.
Comment #10
tim.plunkettFor #8, see #2966592: Figure out a way to render fields on top level in templates
Comment #13
Gábor HojtsyThe template / components approach was already refactored so it supports layouts better. Also #3027614: Use Layout Builder in Umami for the recipe content type in full view mode is there to actually add layouts to recipes. So closing as duplicate.