Needs review
Project:
Menu Token
Version:
9.1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
27 Feb 2018 at 09:15 UTC
Updated:
1 Mar 2024 at 20:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
doxigo commentedI have the same problem, it only works if there's anything before the token in URL
Comment #3
xangyComment #4
xangyPlease review this. Adding the patch for Drupal core as well. See: https://www.drupal.org/project/drupal/issues/2978657#comment-12647144
Comment #5
xangyComment #6
doxigo commentedI ended up with the following errors:
Comment #7
xangyComment #8
hypertext200Closing #2988939: Allow tokens to be used as query parameters as a duplicate.
Comment #9
hypertext200Patch attached, but this approach is completely different and does not require a core patch.
Comment #10
hypertext200This patch doesn't work when you have node in your menu link.
Comment #11
karimbou commentedNotice: Array to string conversion in Drupal\Core\Theme\ThemeInitialization->getActiveTheme() (line 179 of core/lib/Drupal/Core/Theme/ThemeInitialization.php).
Undefined index: add_query_parameters in menu_token_prepare_context_replacement() (line 427 of modules/contrib/menu_token/menu_token.module).
menu_token_prepare_context_replacement(Array)
Comment #12
hypertext200Comment #13
lamp5@heshanlk you attached a diff but where is a patch??
Comment #14
steveoriolThe patch (which is called diff), works very well for me ;-)
Thank you
I installed it on dev version
Comment #15
vuilUpdate #12 to be a patch.
Comment #16
vuilComment #17
vuilComment #18
develcuy commentedThank you all for your contributions and feedback. Just wanted to note that this issue is more a feature request than a bug report, since we are adding new functionality and interface changes. Also, I'm not sure if Menu Token should handle query strings, since the cache can do all sort of things to freeze some tokens that are sensitive to context. That said, I think that this functionality is more appropriate in Javascript OR that we should handle a few cached use cases. In all cases, we should inform the user about how cache can alter her expectations.
Comment #19
shree.yesare commentedComment #20
shree.yesare commentedUpdate #15 to be a patch.
Comment #21
shree.yesare commentedRe-rolling from patch in #15
Comment #22
vuilComment #23
timotej-pl commentedPatch from #21 could not be applied on current dev branch, neither it could not be at the time of posting it.
Added a patch that fixed that problem and also issue from #19.
Needs review.
Comment #24
develcuy commentedPlease re-roll for 9.1.x
Comment #25
mahmoud barhouma commentedComment #28
muriqui commentedOpened merge request: