- πͺπΈSpain rcodina Barcelona
I ended up here because I'm doing a migration from core 9.5.11 to 10.1.5. On 9.5.11 we had Adminimal theme as admin theme and now we are enabling and configuring the Claro theme. The enabled Claro blocks are all set in yml config files. The problem is that when I import the configuration using customer's environment database the following error shows up:
In EntityStorageBase.php line 519: 'block' entity with ID 'claro_footer' already exists.
Using patch on #6 it avoids the import error. However, the blocks we have set in yml files doesn't get imported. Moreover, If do a "drush cex", it deletes the claro blocks I had defined on those files:
[notice] Differences of the active config to the export directory: +------------+-----------------------------------------+-----------+ | Collection | Config | Operation | +------------+-----------------------------------------+-----------+ | | block.block.claro_breadcrumbs | Delete | | | block.block.claro_content | Delete | | | block.block.claro_messages | Delete | | | block.block.claro_local_actions | Delete | | | block.block.claro_page_title | Delete | | | block.block.claro_primary_local_tasks | Delete | | | block.block.claro_secondary_local_tasks | Delete | +------------+-----------------------------------------+-----------+
Why they get deleted?
- First commit to issue fork.
- Merge request !11926Do not call block_theme_initialize() during config sync β (Open) created by thejimbirch
- πΊπΈUnited States thejimbirch Cape Cod, Massachusetts
Added tests and got everything to green. I used AI to help me put this together as I am still pretty green to writing tests.
The 3 tests are:
testNoBlocksCreatedDuringConfigSync
Verifies that block_themes_installed() does not create blocks during a config sync.testBlockHooksModulesInstalledDuringSync
Confirms BlockHooks::modulesInstalled() avoids block creation during config sync.testBlockHooksModulesInstalledWithoutSync
Ensures BlockHooks::modulesInstalled() does create blocks when not syncing.