Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
What's the point of hook_commons_utility_links() when commons_notify_commons_utility_links_alter() completely removes all other alterations? I'm trying to add my own utility links but unless I change my module's weight, nothing happens.
$new_links = array(
'name' => $links['name'],
);
// ...
$new_links['logout'] = $links['logout'];
$new_links['settings'] = $links['settings'];
$links = $new_links;
Comments
Comment #1
ezra-g CreditAttribution: ezra-g commentedI believe that mentions of a hook_commons_utility_links() are actually in error, and that these implementations are actually of hook_commons_utility_links_alter().
However, I can see how commons_notify_commons_utility_links_alter(), which overwrites $links with a $new_links array could overwrite custom links in some cases. I don't immediately see a reason why this is necessary, so retitling with the specific problem here.
Thanks for the report! If you'd like to help fix this bug, you can start by filing a patch.
Comment #2
Devin Carlson CreditAttribution: Devin Carlson commentedThis was fixed as part of #2032427: Message icon appears in header even when trusted contacts/private messages disabled since the approach which caused this issue was no longer necessary.