Exception #0 (LogicException): Unable to load theme by specified key: '12'
-
12-01-2021 - |
문제
it's occurred when I tried to change theme from back-end from custom theme to Luma theme.
I tried:
- check table
core_config_data
for theme entry and check by changing it.
SELECT * FROM
core_config_dataWHERE
pathLIKE '%theme_id%'
it show two entry with different scope one if have scope default and other one is store having id 6 so I delete it.
- check table
theme
for theme id. no luck theme have different id & even i check it by changing id of custom theme after I delete entry and deploy theme. - match both table(
theme
andcore_config_data
) entry in db.
deleted custom theme completely
- delete all db entry for product & category assign theme.
SELECT * FROM eav_attribute WHERE attribute_code = "custom_theme"
SELECT * from catalog_product_entity_varchar WHERE attribute_id = product custom design attribute id ;
SELECT * from catalog_category_entity_varchar WHERE attribute_id = category custom design attribute id ;
I delete all entry for categories & products assign theme.
it's now saving luma theme in back-end but showing error
to try to solve this issues now it's only luma & blank theme.
I can't find any theme having id 12 entry in db. in following tables theme
, core_config_data
해결책
Homepage is assigned to my custom theme whose id is 12. I deleted it so I got this by checking cms_page
table.
- It's common to have such problem when you working with custom themes and delete theme.
- My Suggestion Please check
theme
,core_config_data
table for theme entry andeav_attribute
,catalog_product_entity_varchar
,catalog_category_entity_varchar
,cms_page
,design_change
for assign theme to products,categories,cms pages, custom design.