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.
I ran into a strange problem with this module. I am using i18n_menu as well, and additionally some custom modules to extend that.
What i'm noticing is that on my local dev station, i am able to modify menu_views links by invoking hook_translated_menu_link_alter(), but for some unknown reason, it is not working on my actual servers.
After much digging, it seems that for some reason i haven't sorted out yet, the link object is not alterable...
It seems that adding one line to the menu_views hook_menu_link_alter will tell the alter system that the link should be alterable.
Comment | File | Size | Author |
---|---|---|---|
#2 | menu_views-make-menu-views-links-alterable-2939616-02.patch | 2.08 KB | jannis |
Comments
Comment #2
jannis CreditAttribution: jannis commentedHere is a patch that adds a line to menu_views implementation of hook_menu_link_alter() that adds the alter option to every views_menu menu link and sets its value to TRUE. This allows views_menu links to be alterable by other modules.
Comment #3
jannis CreditAttribution: jannis commentedComment #6
markhalliwellComment #7
markhalliwellAlso, this is really a bug, not a feature.
Comment #8
jannis CreditAttribution: jannis commentedthat was fast
Comment #9
markhalliwellHeh, it was a relatively simple enough change and I figured you've already spent the time to debug it. This project isn't exactly on my fast track of things to thoroughly test, so I'm trusting the patch :D