The XML sitemap module adds a fieldset to the menu link item form to set an individual menu links as excluded or included. The good ol' menu_link_save() function has this fun tidbit that prevents hook_menu_link_item_update() from firing:
if (!$existing_item || (array_intersect_assoc($item, $existing_item)) != $existing_item) {
// Perform db merge and stuff ...
// Notify modules we have acted on a menu item.
$hook = 'menu_link_insert';
if ($existing_item) {
$hook = 'menu_link_update';
}
// Perform other stuff
}
So if an end-user just changes the XML sitemap settings, since the values get skipped when using array_intersect_assoc(), the section is skipped.
Comments
Comment #1
lucascaro commentedI think this may have been fixed already. Is it still an issue?
The line has been changed to:
if (!$existing_item || (array_intersect_key($item, $existing_item)) != $existing_item) {and the logic has been reworked.
Comment #2
dave reidNo, this is still not resolved. Even with the changes to menu_link_save() the hooks are not getting executed.
Comment #3
BrendanSmith commentedHi,
I'm still having issues invoking hook_menu_link_update in version 7.32, Is their a work around until this issue has been resolved?
EDIT: I was mistaken, the hook is only invoked when every value in $existing_item is not the same in menu_link_save()