Categories
CMS Drupal Mastering Development

Sub-theme adding prefix to all block machine names

On my site, I have created a sub-theme of a sub-theme using this as a guide to set this up https://www.drupal.org/docs/8/theming-drupal-8/creating-a-drupal-8-sub-theme-or-sub-theme-of-sub-theme and it does work with carrying over all of the css/js/regions but for some reason, it is renaming all of the blocks with the prefix of the sub-theme.

So, for example, I have a block with a machine name of mainnavigation when I install/set as default the sub-theme it will change this block to theme3_mainnavigation.

I have tried removing the block and placing it back in with the same name of mainnavigation but I run into an issue where a message will appear that says this machine name already exists.

Does anyone know how to get around this so the sub-theme will use the machine names of already existing names instead of creating a prefix?

Thanks for any help!

Leave a Reply

Your email address will not be published. Required fields are marked *