Problem/Motivation
Most of the layout plugins used with the newly introduced (beta2) LayoutSource plugin are OK:
- the ones from Layout Builder (ex:
layout__twocol_section) are OK - most of the ones from Layout Discovery (ex:
layout_twocol_bricks) are OK
But layout__onecol don't render regions with nested list of arrays. I don't know why, the twig looks OK, where the full region is printed without checking the inner structure:
<div {{ region_attributes[region].addClass('layout__region', 'layout__region--' ~ region|clean_class) }}>
{{ content[region] }}
</div>
Maybe an alteration somewhere.
Proposed resolution
- Flat the source list in layout regions for all layouts.
- Add some unit or kernel tests
Issue fork display_builder-3573805
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
pdureau commentedWIP
Comment #4
pdureau commented3 changes has been made:
src/Plugin/UiPatterns/Source/LayoutSource.phpSourceWithSlotsInterface::setSlotValue()SourceWithSlotsInterface::setSlotValue(), so it was fixed everywhere it is used.I would be pleased to discuss with a reviewer about this nested list of arrays issue. I am not conformable the issue has been fixed without being understood. What is the real root cause here?
Comment #5
grimreaperThe problem comes from the comment field.
Comment #6
pdureau commentedIndeed. An empty render array in a layout region is enough to cancel the rendering of the full layout plugins, so let's remove them from the renderable.
The initial investigation was wrong:
I will create an issue about the empty comment field, which is the reason we were initially confused. It is a totally distinct issue.
Comment #7
pdureau commentedComment #8
grimreaperGood for me!
Comment #9
pdureau commentedComment #11
mogtofu33 commented