- πͺπΈSpain candelas
I am having the same problem. Thanks @ressa . I go to test your solution.
- πͺπΈSpain candelas
Buf, when I try to import one image style, I get like 25 problems with old themes (since Drupal 5) that don't let to me.
So I went to the database and search them and delete. I put here one example, just in case someone finds this. Also I don't understand why an image style has to give this errors. I translate because the errors are in Catalan (though as an admin I have English). I try to import with drush, so this is what my terminal gets.
The error
The configuration <em class="placeholder">block.block.adminimal_system_main</em> depend on the theme <em class="placeholder">adminimal</em> that will not be installed after import.
The sql to delete it
DELETE FROM `key_value` WHERE `key_value`.`collection` = 'config.entity.key_store.block' AND `key_value`.`name` = 'theme:adminimal';
- π©π°Denmark ressa Copenhagen
Thanks for sharing @candelas. Would this be safe to use? Of course only if Adminimal theme will not be used any longer:
drush sql:query "DELETE FROM `key_value` WHERE `key_value`.`name` = 'theme:adminimal';"
In case you still have a back up of the database, it would be interesting to find a command which can clear all blocks from an ancient, removed theme.
- πͺπΈSpain candelas
The problem is that each of us will have different ones.
And if you make a database backup, you are not using anymore the adminimal theme, you can run that command without problem.
At the end, I have used this drush commanddrush sql:query "DELETE FROM config WHERE name IN ('block.block.bluebreeze_new_fixed_user_login ', 'block.block.bluebreeze_new_node_syndicate', 'block.block.bluebreeze_new_search_form', 'block.block.bluebreeze_new_user_login', 'block.block.bluebreeze_node_syndicate', 'block.block.bluebreeze_search_form', 'block.block.bluebreeze_user_login', 'block.block.bluemarine_node_syndicate', 'block.block.bluemarine_user_login', 'block.block.bootstrap_block_8', 'block.block.bootstrap_system_main', 'block.block.bootstrap_user_login', 'block.block.box_grey_node_syndicate', 'block.block.box_grey_search_form', 'block.block.box_grey_user_login', 'block.block.garland_block_15', 'block.block.garland_block_8', 'block.block.garland_block_9', 'block.block.garland_menu_menu_collaboration', 'block.block.garland_node_syndicate', 'block.block.garland_system_main', 'block.block.garland_user_login', 'block.block.jul_fixed_node_syndicate', 'block.block.jul_fixed_search_form', 'block.block.jul_fixed_user_login', 'block.block.jul_node_syndicate', 'block.block.jul_search_form', 'block.block.jul_user_login', 'block.block.lela_block_15', 'block.block.lela_block_8', 'block.block.lela_block_9', 'block.block.lela_menu_menu_collaboration', 'block.block.lela_node_syndicate', 'block.block.lela_search_form', 'block.block.lela_system_main', 'block.block.lela_user_login', 'block.block.seven_block_17', 'block.block.seven_menu_menu_collaboration', 'block.block.seven_search_form', 'block.block.seven_system_main', 'block.block.stark_search_form', 'block.block.stark_system_main', 'bluebreeze-fixed.settings', 'bluebreeze.settings', 'bluemarine.settings', 'box.settings', 'jul.settings', 'language.content_settings.menu_link_content.menu_link_content', 'lela.settings')"
- π©π°Denmark ressa Copenhagen
I agree, every Drupal installation's lingering left over theme cruft will be unique, for sure. My thinking is just that for example for me, I only had left over block references from two themes, so in my case it might have been enough to run these two commands, as opposed to my workaround to create a dummy-theme ( #9 β¨ Clear blocks table of old theme references Active ):
drush sql:query "DELETE FROM `key.value` WHERE `key.value`.`name` = 'theme:bluemarine';" drush sql:query "DELETE FROM `key.value` WHERE `key.value`.`name` = 'theme:bluebreeze';"
Similarly, in your case, these commands might have take care of most old references for you (though
box
might not have been a theme?):drush sql:query "DELETE FROM `key.value` WHERE `key.value`.`name` = 'theme:bluebreeze';" drush sql:query "DELETE FROM `key.value` WHERE `key.value`.`name` = 'theme:bluemarine';" drush sql:query "DELETE FROM `key.value` WHERE `key.value`.`name` = 'theme:bootstrap';" drush sql:query "DELETE FROM `key.value` WHERE `key.value`.`name` = 'theme:box';" drush sql:query "DELETE FROM `key.value` WHERE `key.value`.`name` = 'theme:garland';" drush sql:query "DELETE FROM `key.value` WHERE `key.value`.`name` = 'theme:jul';" drush sql:query "DELETE FROM `key.value` WHERE `key.value`.`name` = 'theme:lela';" drush sql:query "DELETE FROM `key.value` WHERE `key.value`.`name` = 'theme:seven';" drush sql:query "DELETE FROM `key.value` WHERE `key.value`.`name` = 'theme:stark';"