Posted by bobzillaforever on November 10, 2009 at 6:30pm
| Project: | Pathauto |
| Version: | 6.x-1.2 |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
| Issue tags: | bulk |
Issue Summary
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.
Comments
#1
Okay, so I found a fix.
In the
$nodeobject being passed intohook_nodeapi(), I noticed that$node->taxonomywas a multi-dimensional array, with the first dimension being a vocabulary, and the second being the terms inside that vocabulary. The$node->taxonomyin 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.#2
Tagging all the bulk alias issues for #713238: RFC: Pathauto Bulk module.
#3
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.
#4
Automatically closed -- issue fixed for 2 weeks with no activity.