Problem/Motivation
A component used through a field formatter cannot get content in its slots from the Config panel. "Add content" fails with a TypeError in ComponentFormBase::announceValues(), and the formatter settings come back empty on reload.
The panel builds the source form from the form state values, which are empty after a button limiting validation, and saves raw values: the root form has no #tree, button values are kept, and a save without trigger runs the first button of the form.
Steps to reproduce
1. Use Display builder on an entity view display and set the Body field to "Component per item (UI Patterns)".
2. Pick a component with a slot, then click "Add content".
Issue fork display_builder-3626043
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
just_like_good_vibesComment #4
pdureau commented✅ The fix is unblocking the access to the slot inline modal
But I am now seeing something wrong in inline form updates (maybe not introduced by this change, just hidden before and now visible)
Setup:
Add a widget source (so without opening a modal):
Inside an inline modal, the preview behavior change according to the source:
We have similar behavior with "Cancel" button, but it may be just another effect of the same cause.
What do we do? We try to fix this second part here? Or we do a follow-up?
Comment #5
pdureau commentedRTBC finally, because the issue I met seems to be this existing one : #3554416: Remove Update button from ContextualFormPanel
I will copy my test results there.
Comment #8
mogtofu33 commented