Hai,

I created a profile by using profile2 module. I want to user navigate to directly to edit area to edit his profile. So I used menu token module.

But I am unable to add token in menu path. I tried all options in given area. I am getting following message, please check it.

The path 'menutoken/5509ac7dcda1a' is either invalid or you do not have access to it.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

DevElCuy’s picture

Thanks for reporting! Can you try the dev version instead and share your feedback?

sibro’s picture

FileSize
106.38 KB

I also get path invalid. It is not recognizing my path. See edit menu link pdf attached. I am also on Beta 5

From Watchdog
Location https://test.fjmc.org/system/ajax
Referer https://test.fjmc.org/admin/structure/menu/item/8872/edit?render=overlay
Message Notice: Undefined index: node in menu_token_form_menu_edit_item_alter() (line 379 of /home/fjmctest/public_html/sites/all/modules/menu_token/menu_token.module).

giuvax’s picture

Same here.
I cannot use the module to redirect users to user/[current-user:uid]/scaffale (=dashboard).
Any clue?

DevElCuy’s picture

Status: Active » Closed (outdated)
ron_s’s picture

Version: 7.x-1.0-beta5 » 7.x-1.x-dev
FileSize
2.99 KB

I won't open this issue because it says Drupal 7 is no longer supported, but there are a couple of bugs in the menu_token_handler validation function for 7.x-1.x-dev.

First problem is a typo. The code for $link_path_tokens was copied for $link_title_tokens, and clearly forgot to update one of the variables. The code says this:

$link_title_tokens = array_intersect($link_path_tokens, $entities);

... and it should be this:

$link_title_tokens = array_intersect($link_title_tokens, $entities);

The second issue is extra tokens that have a type of node or user are considered invalid. A perfect example is mentioned in comment #3. The token current-user is a completely valid user-type token, but the code only allows a user token if its type is set exactly to user.

I wrote a patch that fixes the typo and passes validation for any token that are of type "user" or "node". If any interest, see attached.