Undefined array key for non-reusable blocks

Created on 19 September 2023, about 1 year ago
Updated 16 May 2024, 7 months ago

Problem/Motivation

Steps to reproduce

To use reusable, non-reusable custom blocks

Proposed resolution

Add additional check if such block exists.

We have reusable and non-reusable custom blocks. In /layout_builder_restrictions/src/Plugin/LayoutBuilderRestriction/EntityViewModeRestriction.php file function alterBlockDefinitions () there is a code $delta = $content_block_types_by_uuid[$uuid]; '$uuid' takes value from $definitions whole list of block without reusable restriction, and '$content_block_types_uuid' is taken from $this->getBlockTypeByUuid() where there is a restriction by 'block_content_field_data' reusable value. So we get underfined array key error.

🐛 Bug report
Status

Postponed: needs info

Version

3.0

Component

Code

Created by

🇺🇦Ukraine yugro Lutsk

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