It seems that block_page_alter was used at some point to place the blocks in the renderable array in drupal_render_page.
In common.inc, there is a comment before the invokation of hook_page_alter
// Modules alter the $page as needed. Blocks are populated into regions like
// 'sidebar_first', 'footer', etc.
drupal_alter('page', $page);
and block_install changes the weight of block so that it is the first page_alter called
function block_install() {
// Block should go first so that other modules can alter its output
// during hook_page_alter(). Almost everything on the page is a block,
// so before block module runs, there will not be much to alter.
db_update('system')
->fields(array('weight' => -5))
->condition('name', 'block')
->execute();
}
However, blocks are now added using block_page_build.
At the very least, the comment in common.inc should be removed. The reordering of weights achieved through block_install might not be necessary anymore either. If it is, the comment should be changed to clarify why.
Comments
Comment #1
Anonymous (not verified) commentedAttaching a patch for the comment issue in common.inc
We should still consider the second block of code, whether it can be removed altogether or whether the comment should be changed.
Comment #2
Bathie commentedHello. The patch did not apply because it was too old.
I recreated it against 7.x-dev of 15 Feb 2012.
Did I do it the right way? This is my first patch.
Comment #4
Bathie commentedHello, I don't see the problem with the failed patch, could you help me?
Comment #5
bobbyaldol commented@Bathie , you did not mention the function name (ie you did not clearly tell where the change is.) I guess. I am new to Drupal too, just guessing because thats the only difference between your patch and linclark's.
Comment #6
bobbyaldol commentedComment #7
tim.plunkettMoving to 8.x to be fixed there first.
Comment #8
dcam commentedRerolled #1 for D8.
Comment #9
dcam commented#8: block-comments-1062576-8.patch queued for re-testing.
Comment #10
benjy commentedRe-rolled this patch.
Comment #11
benjy commentedComment #12
benjy commentedThis issue is no longer relevant as the comment has already been fixed.