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.
In my subtopic Bootstrap 3.3 my block has this ID :
block-reinsurance
I just created a Bootstrap 3.4 subtopic and now my block automatically has this ID :
block-subtheme-bootstrap-reinsurance
Bootstrap adds the machine name of the subtopic to the block ID.
This is valid for all block IDs. Why blocks are automatically renamed ?
Comments
Comment #2
markhalliwellThis isn't an issue caused by this project.
The block.vars.php file really hasn't changed that much in 7.x-3.x and certainly has never changed any IDs.
---
On a side note, and along with AJAX reasons, this is why you don't target IDs of elements but rather specific classes or data attributes.
Comment #3
mvnovick CreditAttribution: mvnovick commentedI got the same issue in Drupal 9 after creating a child theme of the Bootstrap theme (8.x-3.25). All my blocks got renamed, and the name of the Bootstrap child theme is appended to the original block machine name as follows: [subtheme_name]_[block_name]. This requires me to rename all my block templates and change some CSS. Blocks should not be renamed if a new theme is used as default.