Problem/Motivation

Condition plugin forms assume they are top-level by reading FormStateInterface::getValue('foo') directly instead of finding the correct values based on the plugin form's position in the parent form. This works fine in core, but fails the moment the plugin forms are nested.

Proposed resolution

Read #parents from the form elements and use those to let NestedArray extract values from the form state.

Remaining tasks

None.

User interface changes

None.

API changes

None.

Data model changes

None.

Beta phase evaluation

Reference: https://www.drupal.org/core/beta-changes
Issue category Bug, because the issue fixes incorect PluginFormInterface implementations.
Issue priority Normal, because regular Drupal core workflow is unaffected
Unfrozen changes Unfrozen because it is a bug fix
CommentFileSizeAuthor
#1 drupal_2537720_1.patch5.96 KBxano

Comments

xano’s picture

Status: Active » Needs review
Issue tags: +Needs tests
StatusFileSize
new5.96 KB

This still needs tests. Ideally we'd use the form that #2532968: Block plugin forms assume they are top-level introduces.