Configuration import fails when reverting back to allow_custom: false

Created on 16 July 2019, almost 5 years ago
Updated 8 September 2023, 9 months ago

Original configuration on a node had the layout option for "Allow each content item to have its layout customized." checked.

This created a .yml config for the field i.e. field.field.node.book.layout_builder__layout.yml
Unchecking the file and exporting config removed this file but left the dependency in core.entity_view_display.node.book.default.yml the allow_custom: was changed from true to false.
This resulted in an error importing config in other instances.
Drush error follows:

Drupal\Core\Config\ConfigImporterException: There were errors validating the config synchronization.                                                                                                                                                 [error]
Configuration <em class="placeholder">core.entity_view_display.node.book.default</em> depends on the <em class="placeholder">field.field.node.book.layout_builder__layout</em> configuration that will not exist after import. in
Drupal\Core\Config\ConfigImporter->validate() (line 737 of /app/web/core/lib/Drupal/Core/Config/ConfigImporter.php).
The import failed due for the following reasons:                                                                                                                                                                                                     [error]
Configuration <em class="placeholder">core.entity_view_display.node.book.default</em> depends on the <em class="placeholder">field.field.node.book.layout_builder__layout</em> configuration that will not exist after import.

Manually removing the dependency corrected this error.

πŸ’¬ Support request
Status

Active

Version

9.5

Component
Layout builderΒ  β†’

Last updated about 14 hours ago

Created by

πŸ‡ΊπŸ‡ΈUnited States bsnodgrass

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024