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

zenimagine created an issue. See original summary.

markhalliwell’s picture

Status: Active » Closed (cannot reproduce)

This 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.

mvnovick’s picture

I 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.