This is a problem specifically related to using the Hierarchical Select module in combination with pathauto.

Issue is, if I create an automated alias on an individual node, the alias is built correctly (IE: mysite.com/my-brand/my-parent-category/my-child-category/my-product), but when doing a bulk update, the whole taxonomy tree is dropped (IE: mysite.com/my-product). I've been using [save-lineage-termpath-raw:2]/[save-lineage-termpath-raw:3]/[title-raw] for my pattern.

CommentFileSizeAuthor
#1 pathauto-628938-1.txt1.02 KBbobzillaforever

Comments

bobzillaforever’s picture

StatusFileSize
new1.02 KB

Okay, so I found a fix.

In the $node object being passed into hook_nodeapi(), I noticed that $node->taxonomy was a multi-dimensional array, with the first dimension being a vocabulary, and the second being the terms inside that vocabulary. The $node->taxonomy in the bulk update function was a one-dimensional array, with only the taxonomy term IDs. This patch runs through the taxonomy terms associated with a node and converts them to a multi-dimensional array before creating the node's alias.

dave reid’s picture

Issue tags: +bulk

Tagging all the bulk alias issues for #713238: RFC: Pathauto Bulk module.

dave reid’s picture

Category: bug » support
Status: Needs review » Fixed

This needs to be fixed rather in the module that provides the taxonomy tokens. There are several different ways Drupal formats $node->taxonomy and modules have to account for that. Feel free to mark this back as active once the 'Project' field is changed to the appropriate project.

Status: Fixed » Closed (fixed)
Issue tags: -bulk

Automatically closed -- issue fixed for 2 weeks with no activity.