I have Drupal 8.7.3 installed with a Node type which has multiple Display View modes configured.
E.g. let's say I have enabled Default, Teaser, List layouts for a page node.
ALL of these view modes have layout builder enabled and configured differently.
DEFAULT layout has Allow each content item to have its layout customized. enabled.
I have a View displaying page nodes in LIST view mode, for example. They all display fine with layout builder context configured in LIST view mode.
As soon as I override one of the nodes layout (customize specific node), I have an issue: all of the nodes that don't have customization, still display with LIST view mode configured. BUT the one that was overridden shows up with its overridden specific layout.
I think that specific node override of layout builder shouldn't affect other view modes (at least until this one is resolved, maybe? https://www.drupal.org/project/drupal/issues/2907413)
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | 3064039-10-8.8.x-view-modes.patch | 923 bytes | naveenvalecha |
| #5 | layout-builder-node-default-override-affects-all-layouts--3064039-5-d8.patch | 923 bytes | veronicaseveryn |
Comments
Comment #2
veronicaseveryn commentedComment #3
tim.plunkettOhhhh that's an interesting way to think of it. I wonder if we can get this working this without breaking things for people who absolutely want their overrides to work in all cases (thought that sounds odd, now that I say it)
Comment #4
tim.plunkettFixing circular reference I just made :)
Comment #5
veronicaseveryn commentedFor now the only place where I could think of fixing it to make it work for me was in
OverridesSectionStorage->isOverridden().Again, maybe it will better fixed when we allow overrides for each display separately, but at the moment I need it to work in my use case (otherwise, teasers become "full" nodes :)) ).
Comment #7
tim.plunkettThanks for the initial approach! Looks like a good place to solve it.
Commits land in the latest branch first, so even if we want this in 8.7 we'd need to get it into 8.8 first
Can be replaced with
$view_mode = $this->getContextValue('view_mode');\Drupal\layout_builder\Form\LayoutBuilderEntityViewDisplayForm::isCanonicalMode()tries to be more specific about whether full or default should be relied up. This also might need to care about one vs the otherComment #10
naveenvalechaHere's the rerolled patch for 8.8.x
Comment #15
smustgrave commentedSo using layout builder in 9.5 I seem to be able to apply layout builder to all the view modes
Can you confirm this is still an issue? Know layout builder was still going through changes in Drupal 8 before D9
If not an issue (or the issue will be solved in https://www.drupal.org/project/drupal/issues/2907413) please close
If a separate issue please reopen with an updated issue summary
Comment #17
smustgrave commentedSince this moved to PNMI over 3 months ago, which is the threshold going to close as outdated.
If still a valid issue please reopen with an updated issue summary
Thanks