The codebase I am working on uses hierarchical select with taxonomy to make it easy for editors to tag from nested terms. Pathauto is used to create the URL alias for the content type. We need both the parent and child terms in the URL, so use this token: [save-lineage-termpath-raw].
However, a problem occurs when you add a second vocabulary for the same content type. This breaks pathauto and it can not create the URL alias. Fortunately there is another token to save the day: [save-lineage-termpath-raw:vid].
[save-lineage-termpath-raw:vid]. only has output when terms are present for the vocabulary with the specified vid.
In this case, the vocabulary that I want to use with this path is the first one, which has an ID of 1. So the token is: [save-lineage-termpath-raw:1]
At this point, alarm bells start ringing because when you save the pathauto form, you will get a validation error.
The Pattern for all Car review paths is using the following invalid tokens: [save-lineage-termpath-raw:1].
Fortunately there is a patch for this already, which you can find here: http://drupal.org/node/1137056
If you don't know how to apply a patch, follow these steps:
Does Drupal development make your head explode and drive you crazy?
Why not learn from someone who has paved the way instead?
Sign up to my upcoming learning series.
I am Blair Wadman and this is where I write about Drupal, PHP, CSS etc
© Blair Wadman
2005 - 2011
Post new comment