OutOfBoundsException: Invalid delta "2" in Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay->getSection() (line 41 of /app/web/core/modules/layout_builder/src/SectionStorage/SectionStorageTrait.php).
is thrown when a 3th seciton is added.
I reproduced this on vanilla drupal
Steps to reproduce
- For a content type, enable "Layout builder" and "Allow each content item to have its layout customized"
- On content type level: Create header section with all layout builder lock settings enabled except "Do not allow adding a new section after this section" and " Do not allow updating default blocks"
- On content type level: Add a "Custom block" as header in this header section
Now, create a new node for this content type
- add a new section (This will silently fail, the error above is not explicit thrown but it silently discarded I think)
- add a new section (2nd will fail and throw the error).
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3150489-2.patch | 1.47 KB | swentel |
Comments
Comment #2
swentel commentedThis should do it. Tests should pass normally, and I'm not even sure I have to add additional ones.
Comment #4
swentel commentedcommitted and push, will do a new release also.
Comment #5
swentel commented