Im getting errors after I done a fresh install to magento 2.1.6 and relinked to old DB.
Now when I select certain items in the menu it will throw this error.
I went to DB and changed the theme ID over but then it goes from Key 6 to Key 4.
What can i do to fix this problem
Any help is greatly appreciated.
a:4:{i:0;s:42:"Unable to load theme by specified key: '6'";i:1;s:9519:"
#0 /home/www/public_html/vendor/magento/module-theme/Model/View/Design.php(148):
Magento\Framework\View\Design\Theme\FlyweightFactory->create('6', 'frontend')
Best Answer
See if you have saved the theme in products or categories. In product attribute group 'Schedule Design Update', attribute New Theme, attribute code
custom_design
. Also check categories attribute 'Custom Design', attribute codecustom_design
.You need to update the products and categories data for this attribute in database.
There are 2 entries, 1 from product and 1 from category.
Most likely you didn't set on purpose the Schedule Design on products. You can delete the entries in
catalog_product_entity_varchar
on attribute id custom_layout.The same to
catalog_category_entity_varchar
. Or update with empty string/null in these 2 tables. Or set the new theme id, if you set those values on purpose.Usually the theme id is in products or categories because product imports or other mass action.
Last, reindex all and flush cache.
Also, widgets can have the theme id set.
SELECT theme_id FROM widget_instance;
Cms pages: SELECTcustom_theme
FROMcms_page
;Check 'design_*' tables too.
An extra thing to do would be to dump the structure of the database and search on word 'theme'.