Error: Cannot use object of type Drupal\Core\StringTranslation\TranslatableMarkup as array in frontend_editing_preprocess_block() (line 826 of frontend_editing.module).

Created on 2 June 2025, 3 days ago

Problem/Motivation

When trying to enable Layout Builder for an entity bundle I see this error message:

Error: Cannot use object of type Drupal\Core\StringTranslation\TranslatableMarkup as array in frontend_editing_preprocess_block() (line 826 of modules/contrib/frontend_editing/frontend_editing.module).

Steps to reproduce

  1. Open any Manage display page
  2. Tick Use Layout Builder checkbox
  3. Press Save
  4. Click Manage layout button

Proposed resolution

Adding simple if to make sure $entity_reference_item is an array.

🐛 Bug report
Status

Active

Version

1.8

Component

Code

Created by

🇩🇪Germany yannickoo Berlin

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