- Issue created by @guardiola86
- Merge request !23Issue #3495086: set $form_info default value to array instead of null → (Open) created by Unnamed author
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).
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.
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.
Active
1.0
Code