Needs review
Project:
Token
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Feb 2017 at 13:19 UTC
Updated:
10 Mar 2026 at 10:11 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
blazey commentedAttached patch adds the new
[node:menu-link-from-menu:?]token.It also moves the chained tokens part out of the foreach loop here http://cgit.drupalcode.org/token/tree/token.tokens.inc#n1172. Right now chained tokens are generated as many times as there are tokens. It's redundant because returned values are always the same.
Comment #3
blazey commentedComment #5
blazey commentedComment #6
blazey commentedComment #7
blazey commentedComment #8
blazey commentedComment #9
leksat commentedRerolled on 8.x-1.0.
Comment #10
leksat commentedEven if we use this patch on a production project for quite some time, I have manually tested the rerolled patch with Token 8.x-1.0 and Drupal 8.3.5. Works as expected!
(Patch #9 provided by me is just a reroll.)
Comment #11
berdirThis looks useful, but it needs tests. Should be as easy as adding some additional tokens to assert below "// Test [node:menu] tokens." in \Drupal\token\Tests\TokenMenuTest::testMenuTokens()
Comment #12
msteurs commentedAdding re-roll for Token 8.x-1.3.
Comment #13
msteurs commentedComment #14
stewestThis seems to be _in_ 8.1.5 ?
Comment #15
shubham.prakash commentedComment #16
ngkoutsaik commentedThe reroll seems successful and as confirmed above the patch works. However, this still requires tests before it can be marked as RTBC.
Comment #17
sanjayk commentedComment #18
sanjayk commentedPatch #15 applied successfully. For me RTBC.
Comment #19
pvbergen commentedThe patch in #15 is using a deprecated function for Drupal 9 (Node::urlInfo()). I've adapted the patch for Drupal 9.
Comment #20
mighty_webberPatch for drupal 10.6.2 based on #19.