Currently have a site setup like this:

- Category 1
-- Subc1 (weight 0)
-- Subc2 (weight 1)
-- Subc3 (weight 2)
- Category 2
-- Subc4 (weight -3)
-- Subc5 (weight -4)

Recently I updated from old version of software (pathauto 5.x-1.1, token 5.x-1.6) but the behavior of the URL generation has changed, and I've been banging my head against the wall trying to figure out how to get the URLs to generate consistently.

Example node taxonomy, designated by a *:

- Category 1
-- Subc1 (weight 0)
-- Subc2 (weight 1)*
-- Subc3 (weight 2)
- Category 2
-- Subc4 (weight -3)*
-- Subc5 (weight -4)

Behavior on 5.x-1.1

Using the following token for node path creation: [catpath]/[title]

Path generated: vocabulary/category-1/subc2

This worked well, it didn't get caught up with multiple taxonomy terms, it simply went with the lightest weight term parent not simply the weights of the actual sub-terms (which in the UI can only be set between -10 and 10, though modifying this in the DB seemed to accomplish nothing).

Behavior on 5.x-2.4

Using the following token (catpath no longer available...): [termpath-raw]/[title-raw]

Path generated: category-2/subc4

I've been digging through taxonomy, pathauto, and token trying to figure this out but have had little luck so far. I could be overlooking something simple that has already been accounted for, so that's why I decided to post this. I've never looked at the pathauto, taxonomy, or token code before so trying to wrap my head around all of it at once is giving me a headache.

Thanks in advance.

Comments

greggles’s picture

This is by design. It grabs the lightest weight item which is the most consistent behavior we can do.

Previously it would grab a term without much consistency.

dave reid’s picture

Status: Active » Closed (works as designed)

Agreed with Greg.