Closed (fixed)
Project:
Hierarchical Select
Version:
6.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
5 Oct 2010 at 09:15 UTC
Updated:
24 Apr 2011 at 16:04 UTC
Jump to comment: Most recent file
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 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 commentedAccording to #142 in that issue, it is fairly straightforward to fix.
Comment #3
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 commented#5 Patch works for me (lowercase problem solved)!
Comment #8
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