Closed (fixed)
Project:
Hierarchical Select
Version:
6.x-3.6
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Dec 2009 at 13:19 UTC
Updated:
27 Aug 2012 at 16:36 UTC
Jump to comment: Most recent file
Comments
Comment #1
tayzlor commentedI found a way around this, if you use [save-lineage-termpath:vid] and replace the vid with the vocabulary ID you are using to replace the term paths. The bug still persists with the originally problem, this is just a workaround, However the workaround poses a second problem...
my path gets output term1-term2 instead of term1/term2. I noticed in the documentation it says -
I set the variable doing -
now i get the following - term1term2 (note NO separator). It's stripping the forward slash character out.
In the punctuation settings for Pathauto there is no option to configure that specific character to be 'No Action'.
Any ideas how i can achieve term1/term2 URL path with this module?
Comment #2
wim leersI've noticed this too. Pathauto changed this behavior: it now always strips the forward slash. I now have no idea how to generate a token that results in a "multi-level path addition" (not sure what the right term is). Let's ask in the Pathauto issue queue.
Comment #3
gregglesIf you look at pathauto_clean_token_values in pathauto.inc you should see the code that will either strip, or not, based on the type of token (path-raw or alias being the key ending words for tokens that should contain forward slashes). If that got broken somehow we definitely need to fix it. Is the problem also in 6.x-1.x dev?
Comment #4
tayzlor commentedi think this is a HS problem rather than a Pathauto one.
just done a bit of investigation there and found the following -
The token name we are trying to convert is actually 'save-lineage-termpath-raw:3' , since its from vocabulary 3. It therefore catches the else statement inside pathauto_clean_token_values() because the token string does not end in -raw ?
This in turn means that the '/' slash in the token does not get respected and gets converted to a '-' dash instead.
As the 'save-lineage-termpath-raw' token also does not work properly it is not possible to use that.
so we need to patch 'save-lineage-termpath-raw' token to work, and also change how the vocab tokens work, perhaps to include the [vid] in the middle of the string rather than the end, something like - save-lineage-termpath-2-raw, which would work?
Comment #5
tayzlor commentedattaching a patch which should cover the vocabulary case above.
Comment #6
tayzlor commentedmoving back to HS module, setting patch to needs review.
Comment #7
wim leersMakes sense, patch looks good (I didn't look at the pathauto code though). Does it work for you? Thanks for looking into this!
Comment #8
tayzlor commentedpatch works for me, i'm using it successfully in my dev environment, but ideally would be good if someone else but me confirmed it worked! =)
Comment #9
wim leersI've marked #420548: Problems with URL alias with pathauto and HS' [save-lineage-termpath] token as a duplicate of this issue. Hopefully he will test your patch and report back :)
Comment #10
Bilmar commentedsubscribing
Comment #11
wim leers@trupal218: please test the patch!
Comment #12
Bilmar commentedhello Wim Leers, sorry I couldnt test it last yesterday but I will be testing it tonight (asia time) and will post with feedback. Thanks for the great work tayzlor
Comment #13
Bilmar commentedpatch worked great on test environment and vanilla install! thanks again for the great work
Comment #14
wim leersExcellent! Thanks, trupal218!
Before I can commit this patch though, we need an upgrade path … and that won't be easy. There's two ways: continue to support the old tokens, or attempt to replace all instances. The latter is impossible. We can update all pathauto tokens though. Are there other popular modules that use tokens?
Comment #15
flaviovs commentedPatch in #5 also worked for me. The hard part was to figure out how to set the
hs_taxonomy_separatorvariable. I managed to do it by changing$confin settings.php. Maybe this be in the documentation also (or -- preferred -- you implement some GUI to change the variable).Comment #16
wim leersNobody who wants to contribute an upgrade path?
Comment #17
wim leersClosing due to lack of response. Feel free to reopen.
Comment #18
caesarce commentedHaving trouble getting this to work correctly. Is the patch still necessary and what are the correct steps for putting the variable_set('hs_taxonomy_separator', '/'); code in place?
Comment #19
wim leersTry the latest development snapshot without any other special measures. It contains a fix for these tokens.
Comment #20
caesarce commentedWorks like a champ. Thanks for the great work on this module. I'm delivering a project using taxonomy and your tools to drive structure for a fairly complex SOP model. This should be a good test for your dev version. Let me know if you need any specific features tested to move toward a release candidate.
Comment #21
gregglesGreat news.
Comment #22
wim leers@caesarce: *awesome*! :) Let's see how this initiative works out: #1055536: Help test the development snapshot to get the HS 3.7 release for D6 out! :)
@greggles: yes, indeed! :) HS + Pathauto are merry friends once again. Are you using HS too?
Comment #23
gregglesI don't have any sites where it's running now, but some previous clients are using it.
Comment #24
wim leersOkay, cool :)
Comment #26
OmarQot commentedHi Gents,
I'm not sure if i'm getting this right
when use this for example ([save-lineage-termpath-raw:2])
i get the following error
The Pattern for all xxxxx paths is using the following invalid tokens: [save-lineage-termpath-raw:2]
i'm using version 6.x 3.7
Do I have to do any change to make this work?
Thanks
Omar
Comment #27
sydneyshan commentedGetting the same error as in #26 using 6.x 3.7... Is there a fix to this bug available? I've got 1000 nodes to apply pathauto patterns to and the only way that seems to work is to manually save each node (with pattern set to [save-lineage-termpath-raw] )...
Comment #28
halloffame commentedSame thing for me as #26 and #27. Help!
Comment #29
rakun commentedI am using 3.8. Token [save-lineage-termpath:vid] not working.