Use SubFormState in plugin selectors

Created on 9 January 2016, over 8 years ago
Updated 14 May 2024, about 1 month ago

#2537732: PluginFormInterface must have access to the complete $form_state (introduce SubFormState for embedded forms) β†’ introduces subform states, to make sure that parent and embedded forms can work together without knowing anything about each other. Many plugins assume they can access the top levels of the form states they receive, for instance to retrieve submitted values from. If the parent form passes on its own form state to plugin forms, this fails, unless the plugin forms are embedded at the top level of the parent form, which generally is a bad idea due to conflicts with other elements.

To solve this, plugin selectors must create subform states and pass those on to plugin forms instead of parent form states.

πŸ› Bug report
Status

RTBC

Version

2.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom Xano Southampton

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

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.

  • πŸ‡©πŸ‡ͺGermany SteffenR Germany

    Since nearly a year passed since your last comment, i wonder, if there is any progress in the issue.
    @bradkones1: Did you find time checking the patch / rolling a new release fixing the problem?

    Thx in advance.

  • Open on Drupal.org β†’
    Core: 10.2.1 + Environment: PHP 8.1 & MySQL 5.7
    last update about 1 month ago
    Waiting for branch to pass
  • πŸ‡ΊπŸ‡ΈUnited States froboy Chicago, IL

    It's been a minute. Here's a rerolled patch for 8.x-2.12. Interdiff shows only indexes and surrounding text have changed.

Production build 0.69.0 2024