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

Created on 31 May 2024, 8 months ago
Updated 18 August 2024, 5 months 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

Fixed

Version

2.0

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.71.5 2024