Undefined array key "" in Drupal\layout_builder_browser\Form\BlockForm

Created on 29 March 2023, over 1 year ago
Updated 6 April 2023, over 1 year ago

Problem/Motivation

Adding a new block to a category leads to AJAX Error caused by an undefined arrray key.
Warning: Undefined array key "" in Drupal\layout_builder_browser\Form\BlockForm->form() (line 101 /var/www/html/web/modules/contrib/layout_builder_browser/src/Form/BlockForm.php).

New blocks can't be placed.

Steps to reproduce

Can't be reproduced on a fresh install, you need at least one extra language set to default (in my case ES set as default language and EN as secondary).
Add a new block using the “Place Block” button in /admin/config/content/layout-builder-browser

Proposed resolution

It seems to be caused by changes to file src/Form/BlockForm.php in https://git.drupalcode.org/project/layout_builder_browser/-/commit/10620....

Remaining tasks

Revert changes in commit or find another solution.

User interface changes

None.

API changes

None.

Data model changes

None.

🐛 Bug report
Status

Closed: duplicate

Version

1.5

Component

Code

Created by

🇪🇸Spain alexahumada

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

Comments & Activities

Production build 0.71.5 2024