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.
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.
Comment | File | Size | Author |
---|---|---|---|
#5 | menu_token-form_validation-2454921-5.patch | 2.99 KB | ron_s |
#2 | Edit menu link.pdf | 106.38 KB | sibro |
menutoken.png | 55.15 KB | Sreenivas Bttv |
Comments
Comment #1
DevElCuy CreditAttribution: DevElCuy commentedThanks for reporting! Can you try the dev version instead and share your feedback?
Comment #2
sibro CreditAttribution: sibro as a volunteer commentedI 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).
Comment #3
giuvax CreditAttribution: giuvax commentedSame here.
I cannot use the module to redirect users to user/[current-user:uid]/scaffale (=dashboard).
Any clue?
Comment #4
DevElCuy CreditAttribution: DevElCuy commentedComment #5
ron_s CreditAttribution: ron_s commentedI 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:... and it should be this:
The second issue is extra tokens that have a type of
node
oruser
are considered invalid. A perfect example is mentioned in comment #3. The tokencurrent-user
is a completely valid user-type token, but the code only allows a user token if its type is set exactly touser
.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.