Problem/Motivation
A button that validates nothing, like UI Patterns' source selector toggle #3528205: Performance: On-demand lazy-loading source selector, rebuilds the Config form with its own value and nothing else. ContextualFormPanel::alterFormValues() takes those values as the source's settings, so the stored source is replaced by the button entry.
A field source then loses its derivable_context, the form comes back shaped differently, and the row the button sits in is gone. UI Patterns fatals on the refresh: ComponentFormBase::announceValues(): Argument #1 ($row) must be of type array, null given.
Steps to reproduce
- Create content type article with field reference taxonomy Tags
- Enable Display Builder for this entity full display
- Open
/admin/structure/types/manage/article/display/full/display-builder. - Add/click the Tags field in the Canvas, open its Config, then the Variant box.
- Click Configure: the row does not open, and the error above is in the JS console and in watchdog.
Proposed resolution
Drop the triggering element's own value before treating a rebuild's values as source settings. Kernel test covers both cases: a rebuild carrying only the button keeps the stored source, one carrying form values still updates it.
Issue fork display_builder-3623496
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 #2
mogtofu33 commentedComment #4
mogtofu33 commented