Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 292509

Export block UUID with custom Layout Builder blocks

$
0
0

Problem/Motivation

Currently, if you create custom blocks inside a Layout Builder default layout, those blocks are exported with their revision_id as the key. This can lead to errors when syncing config across environments -- even when those blocks are auto-created via migration or some other method.

Steps to reproduce

  1. Create a new node type on dev/staging environment
  2. Enable layout builder for this bundle (no override layouts)
  3. Create a default layout with inline blocks
  4. drush config:export, transfer config to live environment, drush config:import
  5. visit /admin/structure/types/manage/NODE_TYPE/display/default/layout
  6. WSOD due missing inline blocks, even without overridden layouts

This issue can be mitigated by #3049332: PHP message: Error: Call to a member function getEntityTypeId() on null (Layout Builder) and by exporting blocks with Default Content #2942975: [PP-1] Expose Layout Builder data to REST and JSON:API. However, we cannot guarantee that the revision_id will match when the blocks are exported/imported.

Proposed resolution

Export the 'block_uuid' as part of the configuration, and use it for block loading if it is present.

Remaining tasks

- Needs a patch that is 9.2.x compatible
- Needs tests

User interface changes

- None

API changes

- None

Data model changes

- Adds "block_uuid" to the Layout Builder schema.

Release notes snippet


Viewing all articles
Browse latest Browse all 292509

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>