Closed (fixed)
Project:
Block Group
Version:
7.x-1.0-alpha3
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Jan 2013 at 20:15 UTC
Updated:
18 Jan 2013 at 15:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
jamsilver commentedPatch attached! This makes it work for me with Omega.
Comment #2
znerol commentedThanks for the patch. From what I see, alpha keeps a copy of the regions it moved around in the
#exclude-array. So we may just fetch the blockgroups from there. Attached is a patch which exposes the pullup-key using drupal_alter. Themers doing funny things with the page-array then should implement that hook. The implementation for alpha is given below:Would that approach solve your issue?
Comment #3
jamsilver commentedOoh, interesting solution.
Hard to say whether it is Alpha's responsibility to support Block Group, or Block Group's responsibility to support Alpha. Usually you would say that themes come along later and so should support modules, but Block Group is doing the decidedly dodgy act of injecting regions into the theme (hook_system_info_alter), so perhaps should make the effort to make sure it works in all cases?
Either way, I'd be interested in hearing why Block group needs to pass the $page array by reference here? Obviously this issue would be solved if it just passed its region by value, impervious to any alterations made during page build.
Presumably it's to allow themes / modules to make changes to the block group region?
Comment #4
znerol commentedIts because there could be nested blockgroups. With the pullup-trick I save myself of figuring out the correct processing order in
blockgroup_page_alter. Nested blockgroups are put in place during the #pre_render callback of the enclosing blockgroup.Comment #5
jamsilver commentedAh, very elegant. I like it.
Could there be compromise here, where you move the regions over to some '#blockgroups' part of the page array? Still refer to it by reference so nested blockgroups work, but put it somewhere where people are unlikely to mess with?
Given that altering the page array is a perfectly acceptable thing for people to do, It feels a little fragile that blockgroups can break because of it.
What do you think?
Comment #6
znerol commentedWow, what a great suggestion. That also solves another issue with omega. Because the region is out of the way when the theme picks up, it does not assign those nasty grid-X classes to the blockgroup region anymore.
Comment #7
znerol commented