Enabling wse_lb breaks loading of inline block revisions

Created on 17 October 2023, over 1 year ago

Problem/Motivation

The code in \Drupal\wse_lb\InlineBlockOverride::getEntity() loads block content by ID before loading by revision ID if the former ($this->configuration['block_id']) is available in the configuration. This leads to revisions not being loaded in all cases where there's both, an ID and a revision id in the configuration, which seems to be the case on sites that have existing inline blocks that were created before something in core layout builder changed or so.

Proposed resolution

In \Drupal\wse_lb\InlineBlockOverride::getEntity(), load the inline blocks by revision id before loading by id. Or possibly we can omit loading by ID completely? I'm not very familiar with wse_lb, but at this point I can't see in which kind of scenario it's sensible to load by id at all but I could definitely be missing something here.

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

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

Comments & Activities

Production build 0.71.5 2024