So I tried to create a menu link both in the main and user menus that would take a user to a page named after their user name. I used the token [current-user:name] for the link's path, but left all of the menu token options disabled. I made sure the it was checked as "enabled" and saved it. It saved fine, but on reloading my page, the link does not appear. Is there something I'm missing?

Also, I tried playing around with the menu token options to see what they do, and whenever I chose a "from context" option such as "user from context" and try to save, it tries to delete the link instead. Is this expected?

Sorry in advance if these aren't bugs and I'm just using the module wrong. Thanks!

Comments

havabeer’s picture

Experienced the same thing when trying to create a main menu link for user/[current-user:name]/mycontent. The link disappears from the menu.

However, user/[current-user:uid]/mycontent does work.

(I'm using Extended Path Aliases module. I tried uninstalling it, but it didn't make a difference.)

tribalrose’s picture

I'm getting the same behavior trying the same type of menu links you both described and ... nothing. If I throw in http:// at the front the link will show up but the token won't replace in the path and shows up as [user:uid].

scottcarlton’s picture

Same here too! Replaced it with user/[current-user:uid]/order and worked.

frixos12’s picture

subscibing

epsilon1983’s picture

Came up with a workaround. I created a blank page and linked my menu link to that. Then I used Rules to redirect from that page to user's page using the [site:current-user] token. It works how I want it to, so I uninstalled this module since I don't need it.

I'm leaving this issue active though since it still seems to be a problem with this module.

raulmuroc’s picture

Priority: Normal » Major

It is a major issue, from my point of views cuz if this is not solved, the module doesn't work at all hence the menu link is not seen so it is like if it doesn't exist.

dealancer’s picture

Status: Active » Closed (won't fix)

Hey guys,

Thanks for the feedback.

As path user/[current-user:name]/mycontent is not working in the Drupal this link could not be showed. Try to enter in browser user/admin and user/1 and see what will happen. First link won't work, so there is no reason to show it.

Menu token checks access to the link, if user have no access or if link is not exitst is is hidden. So there is no issue at all. Closing it.

infines’s picture

Title: Nothing appearing after creating a menu link with tokens » Work with the Path Auto module
Status: Closed (won't fix) » Active

This needs to work for all of us using the PathAuto module generating the [current-user:name] for user profiles.

dealancer’s picture

Status: Active » Needs review

Now paths such as users/[current-user:name]. I hope that user/[current-user:name]/mycontent are too.

develcuy’s picture

Status: Needs review » Fixed

I did the following test based on comment #1:

- Created alias 'users/admin' for 'user/1'
- Created a menu item with path: 'user/[current-user:uid]'
- Created a view to list the content of such user, at path 'user/%user/mycontent'
- Enabled module 'Extended path aliases'
- Went to url: users/admin/mycontent

And works!

- Then changed the menu item to the path: 'users/[current-user:name]'
- Again, went to url: users/admin/mycontent

And works!!!

Awesome use case, thanks for the idea!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.