Magento – Magento 2 custom theme layout xml and css not working

csslayouttheme

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/

Best Answer

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

Related Topic