9

I created a new theme and it was working fine but after a few days, I realized some things weren't working.

default_head_blocks.xml is no longer pulling in any css files that I include (both hosted and external)

default.xml is not overwriting parent one.

I'm not sure what is causing this. I even tried deleting /var/ folder as well as /pub/static/frontend/

  • Have you tried deploying content? php bin/magento setup:static-content:deploy – Shahzad K Sep 2 '16 at 20:19
35

Check your DB. There is a table called theme that stores a reference to all the themes that have ever been installed in your store. If the type of the theme is set to 1, that means Magento sees the theme are virtual (what ever that means) and will no longer load your xml files. If that is the case, just change it to 0. I don't know the why of this issue, but it has tripped me up a few time.

enter image description here

  • That is very interesting! I tried that but i didn't do anything but I also didn't restart mamp either. I did end up creating a new theme folder and copying and pasting previous theme to new theme folder and it's working but some of the other stuff that is normally on the site doesn't get displayed (like all the top links). Very odd indeed. – Amy Ling Sep 6 '16 at 15:26
  • 1
    This fixed it for me! I had to set this type value to '0' in the Database. After that I recompiled en deployed all static content. Finally my layout XML's where loaded again! Still no idea how this database type got set to 1 :S Thank you @circlesix – Peter Keijsers Nov 2 '16 at 11:43
  • 1
    Oh My god... I have been stumbling around in the dark for no lie the past 16 hours... Freaking Magento! Thank you so much. – James Harrington Nov 10 '17 at 2:13
  • 1
    You are a legend! I'd been searching for it for hrs and for one point thought that it's something to do 2.1 to 2.2 upgrade. Thank you for the help! – Shoaib Rehman Oct 10 '18 at 12:47
  • 1
    Thanks! for quick patch, reporting it to magento2. – kapil yadav Oct 31 '18 at 13:05
0

I've had the same at one of the theme entry; there was the "1" --> virtual. So changed it to zero as recommended.

/app/design/frontend/Vendor/child_theme/Magento_Catalog/layout/catalog_product_view.xml

Tried also almost completely to comment out the .xml file and the needed column settings, but nothing is changed.

Tried with cache:clean, cache:flush and static-deploy for specific locale (de_DE) and setup:di:compile, nothing changed.

Anyone else, with same issue?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.