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

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

protected by Community Oct 17 at 11:06

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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