Problem/Motivation
The Block Group module works by injecting dynamically generated regions into the region list of all themes. The regions machine names are generated by prefixing the block groups machine names with blockgroup and a hyphen. However according to a comment on DA region names may not contain any hyphens:
If your region has a dash, then it doesn't seem to matter what you use... the template doesn't get picked up. – Beebee
Regrettably the problem is not resolved by just replacing the dashes with underscores in the Block Group source code. Because block group machine-names also use dashes instead of underscores. Therefore the names of existing Block Groups need to be updated on sites using this module.
Proposed resolution
Fix the issue in a new major version of Block Group.
Remaining tasks
- Create new branch and fix the issue
- Release an alpha (without upgrade path from current major version)
- Find an upgrade path for current sites
- Release new stable version
User interface changes
none
API changes
none
Original report by @muhkhwishla
I can't use template hook suggestion file for example region--blockgroup-mygroup.tpl.php.
I check the regions array and despite there is that file added in the hooks it doesn't work at all.
I checked it with devel enabled and template caching disabled. The file name is correct and I can use hooks for normal regions and they work properly.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 0001-Issue-2160669-by-muhkhwishla-Use-underscore-instead-.patch | 5.83 KB | znerol |
Comments
Comment #1
dmaciej commentedComment #2
znerol commentedThanks for the report. This issue actually points to a really bad design error.
Comment #3
znerol commentedComment #4
znerol commentedComment #5
znerol commentedTook a stab on an update hook today. I do not think it is feasible to implement an update routine because of the following reasons:
Committed and pushed bed1bd5.
Comment #6
znerol commentedComment #8
amaisano commentedThe template is still not being picked up. I've deleted that tpl file all together and it's still rendering the default output.
Comment #9
znerol commented@amaisano: Please make sure you've installed Block Group 7.x-2.1. Also note that this issue is closed, I only noticed the update per chance. Please open a new support request if the problem persists.
Comment #10
amaisano commentedSo a vanilla 7.x-2.1 install should pick up the tpl override? I will give it another shot, but I will open a separate issue if it still doesn't work. Thanks.