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

| improve this answer | |
  • 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
  • 1
    You saved my day... but why it happens ? any reason for that ? – Sameer Bhayani Nov 28 '19 at 10:12

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