0

Locally I deleted custom block "CTA" from custom blocks and block types. Then I exported configs and created merge request. After merge is accepted, the pipeline runs commands on the dev server. And after drush -y cim command I receive the table which shows what configs were deleted and changed and also the next error:

[error] Drupal\Core\Config\ConfigImporterException: There were errors validating the config synchronization. Entities exist of type Custom block and Custom block type CTA. These entities need to be deleted before importing. in Drupal\Core\Config\ConfigImporter->validate() (line 750 of /var/www/html/website/web/core/lib/Drupal/Core/Config/ConfigImporter.php).

In ConfigImportCommands.php line 360:

The import failed due to the following reasons:
Entities exist of type Custom block and Custom block type CTA. These entities need to be deleted before importing.

How can I fix this error?

1
  • I usually ignore any block content related configurations using config ignore. Blocks are a config pain.
    – Kevin
    May 25, 2022 at 0:42

1 Answer 1

3

The error message tells you what to do:

Entities exist of type Custom block and Custom block type CTA. These entities need to be deleted before importing.

You can solve this as follows:

  1. Delete all blocks of type CTA at Admin -> Structure -> Block Layout -> Custom Block Library
  2. Delete the CTA block type at Admin -> Structure -> Block Layout -> Custom Block Library -> Block Types
  3. Import the configuration

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.