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.
As I understand it, the [save-lineage-termpath-raw] token will need changing to fit with the current dev versions of pathauto and token. Apologies if I have misunderstood the issue.
Comment | File | Size | Author |
---|---|---|---|
#5 | 931902-hs-path-tokens-array.patch | 2.17 KB | Dave Reid |
Comments
Comment #1
tayzlor CreditAttribution: tayzlor commentedI have also noticed that the [save-lineage-termpath-raw] tokens have gone missing / broken since updating pathauto and token. Will look into these issues and try work on a patch if i have time.
Comment #2
Shadlington CreditAttribution: Shadlington commentedAccording to #142 in that issue, it is fairly straightforward to fix.
Comment #3
Shadlington CreditAttribution: Shadlington commentedFYI - This is now in the latest releases of Token and Pathauto (6.x-1.15 and 6.x-1.5), not just the dev versions.
Comment #4
Dave ReidTagging.
Also see http://drupal.org/node/936068 which is the new handbook page on creating path-style tokens.
Comment #5
Dave ReidUntested patch against 3.x.
Comment #6
Dave ReidMarked #953392: save-lineage-termpath token not lowercased as a duplicate of this issue.
Comment #7
root66 CreditAttribution: root66 commented#5 Patch works for me (lowercase problem solved)!
Comment #8
root66 CreditAttribution: root66 commentedThere's a new problem, my save-lineage-termpath token is always empty now, because the $terms array is never filled:
The print_r's return:
Array
(
[0] => 1
[1] => 2
)
Array
(
[0] => 1
)
Array
(
[19] => stdClass Object
(
[tid] => 19
[vid] => 1
[name] => Test
[description] =>
[weight] => 0
)
[20] => stdClass Object
(
[tid] => 20
[vid] => 1
[name] => Test2
[description] =>
[weight] => 0
)
)
There are the vocabularies 1 and 2. 1 is selected for "HS" and the node has two terms assigned.
The problem is that you check if the $vid is set in $node->taxonomy (isset($node->taxonomy[$vid])), but the $node->taxanomy array uses the term id (tid) as key only, not the vocabulary id.
It worked before, because I had terms with the same tid, as the vid.
Comment #9
Wim LeersThanks, Dave! I fixed some more issues with my implementation (wow that was working poorly, I must've committed some patches without proper review). Now it's working nicely :)
http://drupal.org/cvs?commit=495058
Comment #11
roderik...except [save-lineage-termpath:vid] tokens aren't working for Pathauto.
For the search engines: see #1137056: Pathauto >= 1.4 admin screen disallows [save-lineage-termpath-raw:vid] token