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:

If you don't know how to apply a patch, follow these steps:

  1. Save the patch file to your machine (in this case:  /Users/blair/Sites/Drupal/patches)
  2. In terminal, navigate to the root of the hierarchical_select module folder (sites/all/hierarchical_select)
  3. Run the following command: patch -p0 -i /Users/blair/Sites/Drupal/patches/hs_taxonomy-token-list.patch