Error thrown, when paragraphs field allows all paragraph types.

Created on 30 April 2025, 1 day ago

Problem/Motivation

When we allow all paragraph types (leave all paragraph types unchecked on field creation), clicking on the paragraphs table widget settings button throws the following error:

TypeError: array_key_first(): Argument #1 ($array) must be of type array, null given in array_key_first() (Zeile 291 in /var/www/html/web/modules/contrib/paragraphs_table/src/Plugin/Field/FieldWidget/ParagraphsTableWidget.php).

This is because $this->fieldDefinition->getSetting("handler_settings")["target_bundles"] will return NULL.

Steps to reproduce

Proposed resolution

Add an early return.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇩🇪Germany Grevil

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