[meta] PluginFormInterface implementations assume they are top-level

Created on 20 July 2015, about 9 years ago
Updated 28 February 2023, over 1 year ago

Problem/Motivation

Many implementations of \Drupal\Core\Plugin\PluginFormInterface assume they are used as top-level forms because of the fact they call FormStateInterface::getValue() directly rather than getting the value from the form's state based on the plugin form's position in the parent form. This requires using NestedArray and $form['#parents'].

This works fine in core because most plugin forms are only used in one single way, but this obviously fails when embedding plugin forms in different parent forms. This is exactly what Plugin does.

Proposed resolution

Remaining tasks

Find all broken implementations and create separate issues for them.

User interface changes

None.

API changes

None.

Data model changes

None.

🌱 Plan
Status

Fixed

Version

10.1

Component
Plugin 

Last updated about 15 hours ago

Created by

🇬🇧United Kingdom Xano Southampton

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024