Closed (fixed)
Project:
Menu Token
Version:
7.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 May 2012 at 15:01 UTC
Updated:
6 Apr 2016 at 16:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
segi commentedI have the same problem with beta4 version. I use the same path(edit page) and when I set a different Menu item title as Edit, then the menu item drop the own title and use the user/%user/edit page's title. I found another problem, that this menu item titles don't go through t() function, so every time get back the original English text.
Comment #2
queenvictoria commentedThis is also a problem in 7.x-1.x-dev
Comment #3
chrlvclaudiu commentedYes, seems like it's saving the title for the current user's path.
For instance I'm trying to set a different title for the "user/%/edit" router name and replace it with "user/[current-user:uid]/edit", but after I checked the table "menu_links" for that specific menu link id, "link_path" column shows "user/1/edit" (1 for admin).
My guess is that when the menu item is saved with this token, he replaces the [current-user:uid] token with the ID of the currently logged in user. While being logged in as administrator saw the menu title was correct.
Comment #4
chrisarusso commentedI just implemented a work around using hook_menu_alter() like so:
Comment #5
dasjohere's a work arround: #2113617: Menu item name changes from admin to users
Comment #6
jesse.d commentedIs there a reason that you couldn't change line 118 in menu_token.module?
Currently:
Fixed (at least for the 'user/%/edit' path):
I'm not exactly sure what the effects are on other menu items though or why $item['title'] was choosen originally.
Comment #7
Mazzhe commentedI had a similar issue:
I created a menu item like this: user/[current-user:uid]/cv, and I wanted the title to be «My CV», but it was «My account».
I changed line 118, as jesse.d suggested in #6, and now the title I chose is shown.
Thanks !
Comment #8
pravin ajaaz commentedPatch for the same.
Comment #9
daniel wentsch commentedThanks jesse & Pravin,
what a mean bug, especially because user 1 doesn't see the wrong menu item. #8 fixed it for me, too.
Comment #11
develcuy commentedThanks for testing @Daniel Wentsch
Comment #12
develcuy commentedPatch at #8 committed, please help me test, if somebody complains I'll revert the patch.
Comment #13
develcuy commentedNobody complains after 3 weeks. Thanks everyone!