Currently some modules rely on not required parameters of a link item in their hook_menu_link_alter implementation.
This leads to unnecessary notices about undefined indexes etc.
One way to solve this would be to invoke the alter hook after the defaults are set. But in the worst case this could break some of the checks of contrib modules. The other way is to fix all the contrib modules.
Currently I'm not sure how to proceed here - suggestions?

I've attached a patch which invokes hook_menu_link_alter after the default definition.

Comments

dddave’s picture

Status: Needs review » Needs work

The last submitted patch, menu-invoke-link_alter-after-setting-defaults.patch, failed testing.

Status: Needs work » Closed (outdated)

Automatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.