Incompatibility with Drupal 10.2 field UI changes

Created on 2 August 2024, 4 months ago

Problem/Motivation

The Allow Only One module can be added, but when changing configuration options for the field type during setup, it presents an Ajax error.

In my case, the error is:

ResponseText: The website encountered an unexpected error. Try again later.UnexpectedValueException: The subform is not contained by the given parent form. in Drupal\Core\Form\SubformState->getParents() (line 92 of core/lib/Drupal/Core/Form/SubformState.php). Drupal\Core\Form\SubformState->getValues() (Line: 26)

The error's message makes me think directly to an incompatibilty with the 10.2 changes around forms and subforms in:
https://www.drupal.org/node/3391654 β†’
https://www.drupal.org/node/3347291 β†’

Other modules had this same type of issue, according to issues like:
https://www.drupal.org/project/metatag/issues/3419378 πŸ“Œ Drupal 10.2.x compatibility Closed: duplicate
https://www.drupal.org/project/readonly_html_field/issues/3426382 πŸ› WSOD: The subform is not contained by the given parent form Fixed
https://www.drupal.org/project/custom_field/issues/3400256 πŸ› Fatal error with Drupal 10.2.x Fixed
https://www.drupal.org/project/datafield/issues/3409324 πŸ› On the way to a Drupal 10.2 (and above) compatible version Fixed

Steps to reproduce

- Install the Allow Only One module
- On the "Manage fields" of any entity bundle, add a field as follow.
- Add a field label
- Choose "Allow Only One" as the field type
- Click "Continue" button
- Under "Allowed number of values", change the setting and witness and Ajax error

Proposed resolution

- Make the Allow Only One module compatible with the Drupal core 10.2 field UI changes

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States joshua.boltz

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024