Download & Extend

Taxonomy terms in node path bulk update

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 $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.

AttachmentSizeStatusTest resultOperations
pathauto-628938-1.txt1.02 KBIgnored: Check issue status.NoneNone

#2

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

#3

Category:bug report» support request
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.

#4

Status:fixed» closed (fixed)

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

nobody click here