Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When I enable the Lay-out field in the "Manage form display" of my entity & select the "Layout Builder Widget"
There is a critical error when trying to acces the node edit / add form.
Error: Call to undefined method Drupal\node\NodeForm::getSectionStorage() in Drupal\layout_builder\Plugin\Field\FieldWidget\LayoutBuilderWidget->getSectionStorage() (line 61 of /var/www/html/web/core/modules/layout_builder/src/Plugin/Field/FieldWidget/LayoutBuilderWidget.php)
Comment | File | Size | Author |
---|---|---|---|
#5 | 3076759-5.patch | 1.5 KB | swentel |
Comments
Comment #2
swentel CreditAttribution: swentel at eps & kaas for Dropsolid commentedHmm yes, you shouldn't select that one as that will always crash - irony I know :)
I guess I should add a validation handler that warns the user that the only widget that can be used is the one that this module exposes.
(unless there's another error involved here, haven't manually verified)
Comment #3
stijn.blomme CreditAttribution: stijn.blomme as a volunteer commentedOh, that explains :)
When using the "Layout builder asymetric translation" widget I get the checkbox as expected.
Somehow reading "A widget which you can configure on 'Manage form display' is available to allow copying blocks or not when creating a new translation." on the project page made me assume I had to alter the widget value on the manage form display :)
Comment #4
swentel CreditAttribution: swentel at eps & kaas for Dropsolid commentedAh yes, you have to configure it. Core layout builder hides that field on manage form display by default completely. This modules exposes the field again, and adds a new widget, but should protect against selecting the default one :)
Good to know the workaround works - otherwise all test would have been lying which would be weird :)
I'll probably add a validation handler when I find some time, doesn't seem to critical to me at the moment (but annoying if you encounter it of course)
Comment #5
swentel CreditAttribution: swentel at eps & kaas for Dropsolid commentedComment #7
swentel CreditAttribution: swentel at eps & kaas for Dropsolid commentedadded a validation handler so people can't select it anymore :)