Blocks do not appear to sort by weight before being rendered.
I think the problem is in plugins/context_reaction_block.inc
in the blockgs_get_blocks_by_region
/**
* Get a renderable array of a region containing all enabled blocks.
*/
function block_get_blocks_by_region($region) {
module_load_include('module', 'block', 'block');
$build = array();
if ($list = $this->block_list($region)) {
$build = _block_get_renderable_array($list);
}
if ($this->is_editable_region($region)) {
$build = $this->editable_region($region, $build);
}
return $build;
}
The blocks are not sort before being hand of to _blocl_get_renderable_array which reset the weight to the order of $list.
so i think that doing a sort before and with
uasort($list, 'block_sort');
would do the trick
Comments
Comment #1
e2thex commentedHere is a patch
Comment #2
e2thex commentedok so that did not call the function correctly
need to be
Comment #4
febbraro commentedThis was fixed in alpha3, http://drupal.org/cvs?commit=462090
Thanks @e2thex