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.

CommentFileSizeAuthor
#8 layout-builder-twig.jpg59.69 KBimclean
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jonathanshaw created an issue. See original summary.

jonathanshaw’s picture

Issue summary: View changes
tim.plunkett’s picture

Component: layout.module » Umami demo

The pencil icon is a standard use of contextual module, which LB is dependent on. There is no custom code in LB to support that.

larowlan’s picture

most likely the block template isn't outputting the title_prefix variable

Eli-T’s picture

Version: 8.5.x-dev » 8.6.x-dev

Bumping to 8.6.x-dev as layout builder is experimental in 8.5.x

tim.plunkett’s picture

It's experimental in 8.6 as well.
And as I said before, this seems to be related to contextual links, not Layout Builder.

finnsky’s picture

I 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:

  if (\Drupal::moduleHandler()->moduleExists('layout_builder')) {
    $variables['content'] = $variables['_layout_builder']['content']
  }

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.

imclean’s picture

FileSize
59.69 KB

#7 @finnsky,

...$variables['content'] is changed by LB to: https://i.gyazo.com/f9892c3b6c3f88d736d3e6149e57cd54.png

It can be worse than that. This is what I'm seeing:

The content array isn't indexed by field name.

markconroy’s picture

Status: Active » Postponed
Issue tags: +Umami new feature

I'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.

tim.plunkett’s picture

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Gábor Hojtsy’s picture

Status: Postponed » Closed (duplicate)

The 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.