Theme Dependency Error when you try to do a single item import

We were working on migrating a D7 site to D8 and in trying to import a View to the D8 site we got the following errors:

Configuration block.block.seven_menu_menu_draggable_views depends on the theme that will not be installed after import.
Configuration block.block.seven_system_main depends on the theme that will not be installed after import.
...
Configuration sndev.settings depends on the sndev extension that will not be installed after import.

In my research I found this article that goes into detail as to the ins & outs of this issue.  Apparently this is something that happens often with migrations, especially because genetally there is no upgrade path for themes so the configuration gets migrated and it throws out an error when you make changes (like trying to import a view).  

The most effective fix I found (and the one I incorporated) was to go in and edit the database to remove the unwanted configuration.  I used this code for my situation (of course you will have to edit your code for your particular instance).  I have included for both a "regular" site and when usinf terminus (Pantheon).

Normal Server:

drush sql-query "DELETE FROM config WHERE name IN ( 'block.block.seven_menu_menu_draggable_views', 'block.block.seven_search_form', 'block.block.seven_system_main', 'block.block.seven_user_login', 'block.block.seven_user_new', 'block.block.seven_user_online', 'polaris.settings', 'sndev.settings'  );"

On Pantheon:

terminus drush xxxxxxxx.xxx -- sql-query "DELETE FROM config WHERE name IN ( 'block.block.seven_menu_menu_draggable_views', 'block.block.seven_search_form', 'block.block.seven_system_main', 'block.block.seven_user_login', 'block.block.seven_user_new', 'block.block.seven_user_online', 'polaris.settings', 'sndev.settings' )"

Be careful of your punctuation because good punctuation counts when it comes to drush/sql/terminus (and each is a little different which is why I included the code I used that worked for me).

 

 

 

Add new comment

Filtered HTML

  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.