Closed (outdated)
Project:
Pathauto
Version:
6.x-2.0-rc2
Component:
Tokens
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Aug 2009 at 04:22 UTC
Updated:
7 Feb 2026 at 10:12 UTC
Jump to comment: Most recent
Comments
Comment #1
Drupal9.9 commentedThese bug reports with several comments seen to be talking about something similar.
http://drupal.org/node/217467
http://drupal.org/node/506558
http://drupal.org/node/484770
The issue seems to be with multi-selected terms and perhaps the weight applied to child and parent terms.
Comment #2
Drupal9.9 commentedAfter testing it out I found the issue is indeed to do with the weight applied to parent and child terms. You can work around it by giving parent terms heavier weight than child terms but is causes extreme confusion when you have lots of vocubularies and terms and choose to multi-select between both vocab and terms when creating a new node. This is most defenately not a long term or stable solution.
Comment #3
gregarios commentedI am also having this problem. I have a single hierarchy vocabulary with 2 levels of terms. I can get the paths to be created correctly for most of the terms and child-terms, but only for sets that aren't near the top of the list on the Term hierarchy organization page. Very frustrating. I have several duplicate child terms that have different parent terms, so the workaround listed above will not work for me, because I cannot tell on node creation which parent the child terms are under.
Is there any more information you wish me to check to give you more information so I can help? I'm anxious to see this fixed.
UPDATE:
Ok, the workaround for this, for me, was to edit each of my PARENT terms, starting at the top, and sequentially make their weights 100, 101, 102...
Anyone else using this procedure is advised to look in your database in the 'term_data' table and find the heaviest weighted term. Take that number, add 100 to it, then start with that number to modify your parent term weights, in the Taxonomy settings in Drupal, sequentially.
Comment #4
dave reidTrick is you can only select a single term to reliably make termpath work. There are several other fixed issues in the queue that had this same problem when a node has more than one term in a hierarchy selected.
Comment #6
jrstmartin commented@Dave Reid
For most that is not the desired behavior. When I make a post to "Physics", which is a child term of "Natural Science", I expect the node to be part of both Physics and Natural Science. So selecting just Physics, in order to get the Pathauto URL to output the desired URL of "domain.com/natural-science/physics/node-title", would only make the node part of Physics and not Natural Science.
The 2 contradict each other IMO.
Current workarounds:
Can't win! :)
Comment #7
dave reidI think you misunderstand, in that case if your node is associated with the 'Physics' term *only*, then [termpath-raw] will be natural-science/physics. The problem happens when you associated a node with two or more terms - Pathauto basically guesses at which one to use.
Comment #8
jrstmartin commentedNo I understand. I'm just terrible at explaining things :). What I'm trying to say is that I never select a child term without also selecting its parent term, so there's always more than 1 selected when there's hierarchy. I think this is quite natural in regard to taxonomy hierarchy in general, for example if a node is posted in Physics it's also posted in Natural Science, otherwise it's not really a hierarchy. I know Drupal lets you select just one term in the hierarchy, and maybe that's how we have arrived at this bug. (Forcing parent selection can be done with Hierarchical Select.)
I guess the root problem here is how taxonomy works in core. I think the default behavior should be that parents are automatically selected when their children are selected. Thanks for listening! :D
Comment #9
splash112 commentedA solution could be to use 2 Content Taxonomy fields:
1st; main term with a required max 1 term for the path alias
2nd; extra terms with unlimited terms
Using it now with a patch from this issue: #420240: "termpath" token support for hierarchical vocabularies for use with Pathauto and am so far happy with it. Now just need to find out how to get multiple Taxonomy breadcrumbs on my node pages.
Comment #10
mably commented