Warning: Undefined array key "#type" in Drupal\Core\Form\FormHelper::processStates()

Created on 31 May 2024, 26 days ago
Updated 3 June 2024, 23 days ago

Problem/Motivation

There appears to be an Ajax error preventing the editing of the smart_trim formatter's settings, from the manage display page of a content type.

The error reads :
ErrorException : Warning: Undefined array key "#type" in Drupal\Core\Form\FormHelper::processStates() (line 211 of /var/www/web/core/lib/Drupal/Core/Form/FormHelper.php)

This seems to have been introduced by https://www.drupal.org/project/smart_trim/issues/3368694 πŸ› Remove token_browser from saved configuration of formatter Fixed
We are trying to attach #states to the element and failing, since there is no #type for this element anymore.

Steps to reproduce

- Create a new content type
- Add a formatted text field to it
- Go to the manage display page for this content type
- Select the Smart Trim formatter
- Try clicking on the edit settings cog icon

πŸ› Bug report
Status

Needs review

Version

2.1

Component

Code

Created by

πŸ‡«πŸ‡·France arousseau

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024