Magento – Magento 2 theme fallback without parent

magento2theme-fallback

I have a custom theme that has no parent specified in the theme.xml.

But it still loads the styles-l.css and styles-m.css specified in the blank theme.
(specified in: /vendor/magento/theme-frontend-blank/Magento_Theme/layout/default_head_blocks.xml)

So it looks like it falls back on the blank theme. When i change the xml file in the blank theme the changes also appear in my custom theme.

The CSS files themself are not loaded from the blank theme.

So how does this fallback actually work?
Does it always fallback to the base theme for layout updates or something? Even when no parent is entered in the theme.xml.

Best Answer

The problem was my theme had a parent before but it was removed later.

Flushing cache and removing the static and generation files did not work.

In the theme table of the database the parent was still set to id 1 which is magento/blank. Set the field to NULL and all started working as expected. ......

Related Topic