Form blocks rendered inside layout builder library break save

Created on 4 May 2020, over 4 years ago
Updated 16 May 2024, 6 months ago

The same issue was recently fixed core layout builder #3045171: Form blocks rendered inside layout builder break save
Problem/Motivation
I can no longer save changes to the layout template after any kind of form has been added to the layout.

Steps to reproduce:
1. Enable layout builder library and add a new layout template.
2. Add 'Search Form' block to a section
3. Save the layout
4. Re-open the layout, and make some change (e.g. reorder blocks)
5. Attempt to save the layout

The page refreshes, but still shows unsaved changes. At this point, it is no longer possible to save the layout until the search form is removed.

Proposed resolution
Use the fix from core #3045171: Form blocks rendered inside layout builder break save by providing a #layout_builder_element_keys attribute

Remaining tasks
Add some tests for this issue

🐛 Bug report
Status

RTBC

Version

1.0

Component

Code

Created by

🇫🇷France clement.ferrier

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇨🇦Canada darkodev

    Patch doesn't apply to latest stable, but can be applied manually. Any chance of a release that includes this patch? Thanks for all your work on this cool module.

  • 🇩🇪Germany ammaletu Bonn, Germany

    For me, this patch did apply to the beta4 version and fixed the problem. Using Drupal 10.2.5 and PHP 8.1.27.

    Please, commit this patch and create a new release! I spent an hour chasing this bug, when the patch solving the issue had been published two years before I even started working at my current company! If there is anything else that we can do to help speed this along, please tell us.

Production build 0.71.5 2024