Argument #3 ($form_info) must be of type array, null given

Created on 19 December 2024, about 2 months ago

Problem/Motivation

I get this error after selecting one of the bulk operations options in a view:

TypeError: Drupal\views_ef_fieldset\ViewsEFFieldsetData::moveFormElement(): Argument #3 ($form_info) must be of type array, null given, called in /var/www/html/web/modules/contrib/views_ef_fieldset/src/ViewsEFFieldsetData.php on line 191 en Drupal\views_ef_fieldset\ViewsEFFieldsetData->moveFormElement() (linea 147 de /var/www/html/web/modules/contrib/views_ef_fieldset/src/ViewsEFFieldsetData.php).

Steps to reproduce

This is how I made the error disappear:
- In function recursivetreetofapi, I replaced $form_info = $form['#info']['filter-' . $item['item']['id']] ?? NULL; with $form_info = $form['#info']['filter-' . $item['item']['id']] ?? [];

Function moveFormElement has the third parameter like this: array $form_info so if the variable is null, it will throw an error.

Proposed resolution

This is just a temporary fix so that the error doesn't appear, my actions in the view are working again. I had this working before and the issue started happening when upgrading from Drupal 9 to 10.

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇪🇸Spain guardiola86

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