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.
Hello,
it seems the menu token doesn't support query string '?' in the url.
i attach a screenshot here, and the url in it retruns to be empty.
Comment | File | Size | Author |
---|---|---|---|
#6 | query_string_support-1192488-6.patch | 2.43 KB | dealancer |
#2 | query_string_support-1192488-2.patch | 1.53 KB | psha |
Screenshot.png | 10.02 KB | rogical |
Comments
Comment #1
dealancer CreditAttribution: dealancer commentedComment #2
psha CreditAttribution: psha commentedComment #3
psha CreditAttribution: psha commentedComment #4
funkytraffic CreditAttribution: funkytraffic commented+1
Same issue for the latest 6.x release. Will there be a change to the module?
Comment #5
Anonymous (not verified) CreditAttribution: Anonymous commentedPatch from #2 does not work: it removes the ? and anything after it, instead of allowing to work with it.
Comment #6
dealancer CreditAttribution: dealancer commentedHere is a patch that should work. Please test it.
Comment #7
dealancer CreditAttribution: dealancer commentedComment #8
dealancer CreditAttribution: dealancer commentedComment #9
dealancer CreditAttribution: dealancer commentedComment #10
Liliplanet CreditAttribution: Liliplanet commentedJust discovered this module and without doubt the greatest thing since sliced bread!
Would love to be able to insert ? eg
messages/new/[current-user:uid]?destination=user
Unfortunately patch outputs
syntax error, unexpected $end in sites/all/modules/menu_token/menu_token.module on line 228
Most appreciated :)
Comment #11
noslokire CreditAttribution: noslokire commentedPatch failed for me as well, adding the 2 missing curly brackets to the last line of the patch (lines 218 & 219) worked however.
Would pull down the dev version and patch myself but there looks to be a difference between dev and alpha versions
Comment #12
dealancer CreditAttribution: dealancer commentedyeah, this patch was for the dev version. Please try now.
Comment #13
noslokire CreditAttribution: noslokire commentedGood to go.
Comment #14
dealancer CreditAttribution: dealancer commentedfixed!
Comment #15
dealancer CreditAttribution: dealancer commentedNow we need to backport this patch to 6.x-1.x.
Comment #16
lofos1 CreditAttribution: lofos1 commentedI am using menu token, a custom created token ([current-user:og-uid]), organic groups and organic groups create permissions in D7. I noticed that the patch in #6 fixes the issue with menu token accepting query string, but it now creates a new issue for me.
A Site Admin who has create content permissions site-wide is able to see the Create content link with the token replaced www.yoursite.com/node/add/album?gids_group[]=[current-user:og-uid] , however an authenticated user who is also a group admin and has create content permissions within the group only but not site-wide cannot see the link. Before I applied the patch, both users could see the link, it just did not support the query strings.
I tried adjusting the module weight per the suggestion for a similar issue in http://drupal.org/node/1138070#comment-4534178 but this did not resolve the issue.
Any ideas what the problem might be? If you don't mind, it's fairly critical that I resolve this since it's delaying a site launch. Thanks a bunch :-)
Comment #17
lofos1 CreditAttribution: lofos1 commentedPer my post in #16, I also used the 7.x-1.0-beta1 version, but it is the same issue in beta.
I reverted to alpha3 because using the beta version created another issue for me because this patch http://drupal.org/node/1471730#comment-5700370, only removed the token from a menu I created, but not the entire menu link..... I had a menu www.yoursite.com/node/[current-user:og-nid] but if a user has not yet joined a group, then the token is replaced as www.yoursite.com/node instead of removing the entire menu link since it doesn't exist.
Comment #18
dealancer CreditAttribution: dealancer commentedRe issue described in #17, you can create new issue that allows to hide menu link if token is not present. The purpose of #1471730: Option to clear token if replacement not present is a bit different.
Re issue #16, I am not sure how patch #6 can influence on permissions issue. It will help to understand the issue if you can debug menu_token. Could you please dpm (or print) generated link and access options before this lines:
http://drupalcode.org/project/menu_token.git/blob/refs/heads/7.x-1.x:/me...
http://drupalcode.org/project/menu_token.git/blob/refs/heads/7.x-1.x:/me...
Comment #19
windmaomao CreditAttribution: windmaomao commentedanyone made the patch ported to 6.x yet ? I'll give a shot, but seems like there're many lines of change in code.
Comment #20
DevElCuy CreditAttribution: DevElCuy commentedD6 is discontinued.
Comment #21
DevElCuy CreditAttribution: DevElCuy commentedFix already committed.
Comment #23
betz CreditAttribution: betz commentedIt seems the D8 version neither supports query strings.