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.
Hi,
For some reason when I enable admin menu and go to any nodes that I have added to the menu, they are displayed as node/33 (for example) rather then "about-us"
What am I missing? When I disable the menu it works perfectly.
Thanks
Comment | File | Size | Author |
---|---|---|---|
#17 | urlaliasnotdisplaying-1742844-17.diff | 731 bytes | jlockhart |
#14 | urlaliasnotdisplaying-1742844-14.diff | 731 bytes | jlockhart |
#10 | urlaliasnotdisplaying-1742844-10.diff | 785 bytes | jlockhart |
#3 | urlaliasnotdisplaying-1742844-3.diff | 729 bytes | jlockhart |
#2 | admin_menu_path_aliases_working.jpg | 299.96 KB | jlockhart |
Comments
Comment #1
owenpaula CreditAttribution: owenpaula commentedHello adam3145:
I tried to duplicate the issue you identified above in an effort to help resolve for you. When taking the following steps, I was not able to duplicate the issue. If you do not have this resolved, maybe you can provide more detail about your environment and I will try to duplicate again. Here's what I tested in Chrome:
-Fresh copy of core = Drupal 7.15
-Created basic page titled "about us", added a URL alias of about-us, added to Main Menu.
-Navigated using Main Menu and Dashboard to About Us page and URL = /about-us
-Installed and enabled Admin Menu 7.x-3.0-rc3
-Navigate Home then navigated to About Us via Main Menu and Dashboard and URL = /about-us
-Installed and enabled Admin Menu 7.x-3.0-rc3
-Navigate Home then navigated to About Us via Main Menu and Dashboard and URL = /about-us
Spider_
Comment #2
jlockhartI know this is a really old issue but I just noticed this on one of our dev sites. I was trying to create a handbook using the book module, using the default menu settings on the node edit form, and adding links to the admin menu. I have pathauto installed and the links are directly to the node not to the alias. i.e. /node/1 rather than /handbook. I noticed this issue and thought I should try on a clean copy. So I have a fresh copy of D7, the Admin Menu, Pathauto, and Token installed. The URL alias is working for the article. I added the link to the Main menu and when I roll over it you can see the full alias. I added the link to the Admin menu in the same way and when I roll over the link you can see its giving me the node/nid path.
Working path Alias
Not Working alias
I'll try to track this down myself, but thought I'd give more feedback.
Comment #3
jlockhartI was able to find a fix but I'm not entirely sure its correct. I've added a drupal_get_path_alias to the theme_admin_menu_links function. Basically if the path module is enabled there will most likely be aliases, so check that and check that an alias exists. If so then replace the path with the alias. I'm a little confused though, since I thought the l() function already does that. However, this patch does work, I've tested it on my local and our dev server.
Comment #4
RAFA3L CreditAttribution: RAFA3L commentedthanks @jhenson your patch work fine
Comment #5
tille CreditAttribution: tille commentedhi there,
got the same problem, tried the patch, all caches cleared, but no changes :/
update: my problem was language prefs related – switched language and all is fine.
greetz, t.
Comment #6
DrCord CreditAttribution: DrCord commentedThe patch in #3 worked great to fix this problem for me as well.
Comment #7
jlockhartComment #9
jlockhartLooks like I need to re roll this
Comment #10
jlockhartI downloaded the latest version of admin menu and this still seems to be an issue. I've rerolled the patch to apply to the latest version. Please test.
Comment #12
jlockhartwrong version... this time for sure.
Comment #13
nico.knaepen CreditAttribution: nico.knaepen at Logic in Motion for Colruyt Group Services commentedPatch needs work.
The code on line 681 contains '}' in version 7.x-3.0-rc5. Thereby patch is not applicable.
Please do start the patch from the correct version in order to be able to apply that patch.
Comment #14
jlockhartSorry I guess this was for dev. I just downloaded the latest dev, and tested it on a clean install. Same issue. Applied this new patch and the url alias is used.
Comment #15
nico.knaepen CreditAttribution: nico.knaepen at Logic in Motion for Colruyt Group Services commentedReviewed code, only some coding standards issues.
White spaces not allowed here.
End text with full stop.
Comment #16
nico.knaepen CreditAttribution: nico.knaepen at Logic in Motion for Colruyt Group Services commentedComment #17
jlockhartHows that?
Comment #18
nico.knaepen CreditAttribution: nico.knaepen at Logic in Motion for Colruyt Group Services commentedThat's better.
Comment #20
truls1502Fixed and added in 7.x-3.x-dev