Extra fields weighting not being applied on inline block

Created on 22 February 2024, 10 months ago
Updated 3 July 2024, 6 months ago

Problem/Motivation

I've added an extra field through dcs_ia_entity_extra_field_info and configured it to be displayed below a specific field when managing the relevant content block form display. When adding the block through layout builder the extra field is not in the position that it should be and doesn't appear to have been weighted at all.

Steps to reproduce

Proposed resolution

It appears the issue is with how inline blocks are built. The processForm callback within core/lib/Drupal/Core/Entity/Entity/EntityFormDisplay.php is added at the time when the process callbacks are being called. This is done via a process callback processBlockForm in core/modules/layout_builder/src/Plugin/Block/InlineBlock.php. At this point it is too late and will never be run.

The solution is to change it to an after_build callback so that it is run after the process callbacks.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Needs work

Version

11.0 🔥

Component
Layout builder 

Last updated 2 days ago

Created by

🇦🇺Australia mortim07

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024