If you are using a module such as blockify, or writing your own custom block to render breadcrumbs, breadcrumbs_by_path_page_alter() runs too late.

The solution is two-fold:

  • Use breadcrumbs_by_path_page_build() instead
  • Set the module weight to -6 or lower

This patch only does the first part, I was unsure if you want to change the module weight on install, or if that should be left to the user.

hook_page_build() is directly before hook_page_alter(), and seems like a fine place to run this code.

CommentFileSizeAuthor
allow-blocks.patch485 bytestim.plunkett

Comments

redndahead’s picture

Status: Needs review » Reviewed & tested by the community

This patch looks good. The only issue we could think of is it may be a problem if someone ran drupal_set_title() in a block, but since that's bad practice we weren't so concerned about it.

opdavies’s picture

Status: Reviewed & tested by the community » Fixed

Patch applied to 7.x-1.x-dev. Thanks! :D

I've also added an implementation of hook_update_N() into breadcrumbs_by_path.install to reduce the module weight to -6.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.