Broken block leads to exception

Created on 28 June 2024, 2 days ago
Updated 29 June 2024, 1 day ago

Problem/Motivation

Passing a broken block reference to AdaptableBlockViewBuilder causes an error:
Error: Call to undefined method Drupal\Core\Block\Plugin\Block\Broken::setPagedesignerElement() in Drupal\pagedesigner_block_adaptable\AdaptableBlockViewBuilder::preRender()

Normally, Drupal would just show a notice about the block being broken. The error makes the page inaccessible.

Steps to reproduce

- Add an adaptable block to a page.
- Delete block in block layout
- Access page

Proposed resolution

- Add interface for AdaptableViewsBlock
- Check for correct interface before trying to use setPagedesignerElement

User interface changes

None

API changes

- Additional interface

Data model changes

None

πŸ› Bug report
Status

Fixed

Version

4.0

Component

Code

Created by

πŸ‡¨πŸ‡­Switzerland pvbergen

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024