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
- Create a new node type on dev/staging environment
- Enable layout builder for this bundle (no override layouts)
- Create a default layout with inline blocks
- drush config:export, transfer config to live environment, drush config:import
- visit /admin/structure/types/manage/NODE_TYPE/display/default/layout
- 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.