When trying to alter block directly by using hook_block_view_MODULE_DELTA() will depending on the block translate to an invalid function name.

eg. if you want to alter the main menu block which has a module name of "system" and a delta of "main-menu" then the function name is going to be hook_block_view_system_main-menu_alter(0 which is not a valid function name,

Attached is a patch will will fix the block directly, there is other area where this could also happen. Maybe it needs to have some form of translation in drupal_alter() so there is always a valid function.

CommentFileSizeAuthor
patch_commit_bef4ba505763.patch792 bytesgordon

Comments

star-szr’s picture

Status: Active » Closed (duplicate)
fizk’s picture

Title: hook_block_view_MODULE_DELTA_alter() doesn't always translate to an invalid function » hook_block_view_MODULE_DELTA_alter() doesn't always translate to a valid function