Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
During a custom profile installation, the YML files contained in the default theme's config/install directory are imported in the site configuration as expected. The problem is that if this directory contains block position YML files, these blocks are enabled in all the existing themes.
If the theme is enabled by the profile but not set as default in config/install/system.theme.yml, the problem does not occur.
Steps to reproduce
- Download the attached file
- Install Drupal using the "Demonstrate" profile
- The "search" block has been added to the demonstrate_theme AND to seven
Beta phase evaluation
Issue category | Bug because that is not the expected behaviour |
---|---|
Issue priority | Major as it is going to impact all distributions |
Proposed resolution
No idea.
Remaining tasks
Find the source, fix it, enjoy
User interface changes
None.
API changes
None.
Data model changes
None.
Comment | File | Size | Author |
---|---|---|---|
demonstrate.tar_.gz | 917 bytes | DuaelFr |
Comments
Comment #1
DuaelFrFor information, setting the default theme in the profile's hook_install is an efficient workaround.
Comment #4
msankhala CreditAttribution: msankhala at Srijan | A Material+ Company commentedComment #5
Wim LeersComment #6
Wim Leers#1: your proposed work-around does not work for me, in #2825394: Install profile's block config entities failing to import because their theme is not yet installed, despite being the sole & default theme. Perhaps because I'm setting the admin theme to be the default theme? I don't know.
Comment #7
Wim LeersComment #9
xeM8VfDh CreditAttribution: xeM8VfDh commented@DuaelFr and @Wim Leers, where should to code in #1 go, if I want to test that? in my custom theme's .theme file? Or is this only related to custom modules?Never mind, my problem was unrelated to this. See: https://www.drupal.org/node/2694895#comment-12084564
Comment #16
quietone CreditAttribution: quietone at PreviousNext commentedI tested this on Drupal 9.4.x using the steps in the Issue Summary.
After the install the following search blocks were in config.
There is no longer one for seven but should classy and stable be there? I don't know.
Comment #17
darvanenI really don't think the block should be placed in stable or classy even though they're the chain of base themes for demonstrate_theme.
Downgrading to Normal per https://www.drupal.org/docs/develop/issues/fields-and-other-parts-of-an-...