Configuration import fails when reverting back to allow_custom: false

Created on 16 July 2019, over 5 years ago
Updated 22 May 2023, over 1 year 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 12 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.

  • πŸ‡¬πŸ‡§United Kingdom very_random_man

    I'm experiencing this issue. It looks like disabling 'Allow each content item to have its layout customized.' doesn't remove the dependency on 'field.field.node.CONTENT_TYPE.layout_builder__layout'. If I disable Layout Builder at the same time and then re-enable just that, without the customisation option, the dependency is removed on export.

  • Status changed to Closed: works as designed about 2 months ago
  • πŸ‡³πŸ‡ΏNew Zealand quietone

    The latest comment has a workaround, another comment states that this is not reproducible and there has been no discussion here for over 1 year. Therefore closing this.

    The Drupal Core issue queue is not the ideal place for support requests. The 'support request' option is there for filing support issues for contributed modules and themes. There are several support options listed on our support page β†’ (Community > Support at the top of Drupal.org) and there is Drupal Slack β†’ . You may get better replies in one of those places.

Production build 0.71.5 2024