Fix layout builder references to inline blocks

Created on 25 July 2023, almost 2 years ago

Problem/Motivation

I have a node with layout builder referring to inline blocks. I export both the node and the blocks, however after the import on a target site the blocks are not displayed on the node page, and the layout builder tab throws an error.

It happens because the exported layout builder configuration stores rerefences to the blocks as "block_revision_id" which differ on the target site even though the blocks themselves are imported correctly.

Steps to reproduce

  1. Create a node with layout builder enabled
  2. Add an inline block to the node layout builder
  3. Export the node and the block
  4. Import the node and the block on a target site
  5. Check that the block does not display on the node page
  6. Check that the layout builder tab throws an error on the target site

Proposed resolution

  • Modify the exported layout builder configuration: store block UUID instead of revision ID.
  • Modify the imported layout builder configuration: load block by UUID and inject correct value of revision ID.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇨🇾Cyprus alex.bukach

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

Comments & Activities

Production build 0.71.5 2024