Hi,

I have the following problem:

I have a vocab with the hierarchy option set to "single".
Most of the terms go at least one level down. For example:

-News and Features
--Business
--Environment

I use pathauto and have the setting for my article content type set to "[termpath-raw]/[title-raw]"
So if I want to create an article called "Final Report" and tag it to "Business" I would like to get the path:
/news-and-feature/business/final-report

However, using the HS module for this vocab results in the following path:
/news-and-feature/final-report

Only when I edit the article and save it again, the correct path is created.

I thought this was a pathauto issue, but as soon as I disable HS for the vocab, the right pathalias is created when adding new articles in the way described above.

I also tried to change the HS settings from "select any term" to "select only deepest term" with no success.

Any idea what the problem might be?

Ben

Comments

wim leers’s picture

Assigned: Unassigned » wim leers
Category: bug » support
Priority: Normal » Minor
Status: Active » Postponed (maintainer needs more info)

You're definitely configuring it the wrong way.

When you're not using HS, what exact selection do you make? Please post screenshots to make that clear. Also, do you have save_lineage enabled?

WorldFallz’s picture

I just came across this also.

pathauto settings: content/[vocab-raw]/[termpath-raw]/[title-raw]

If i create a new vocab named "vocab1" with 3 terms in 3 levels (level1, level2, level3) with hierarchy = single and required = yes (nothing else changed) it works correctly. The URL is correct and only the deepest term shows in the "Posted" node line.

content/vocab1/level1/level2/level3/title

If i enable HS with save lineage, force deepest, node count disabled, & all 3 checkboxes unchecked the url is incorrect-- only the top term in the termpath shows (the rest is correct). However-- all ancestors do show in the "Posted" node line.

content/vocab1/level1/title

No matter what I do I can't seem to get the termpath in pathauto when HS is enabled.

wim leers’s picture

Title: Problem in connection with pathauto [termpath-raw] » Support [lineage_termpath] token
Category: support » feature
Priority: Minor » Normal
Status: Postponed (maintainer needs more info) » Active

Your post helped finding the cause :) Well, it gives a very strong suspicion, I didn't verify it.

Pathauto's termpath: given ONE term, get all parents and show them in a hierarchical form in the URL
HS' save lineage: saves EVERY term in the lineage

In other words: Pathauto gets confused. I'll see if I can add support for this.

wim leers’s picture

Status: Active » Fixed

Implemented!

It's limited in use though:

- The special [save-lineage-termpath] token only works if the vocabulary that
  has save_lineage enabled, is the only vocabulary. Furthermore, it does work
  with content_taxonomy fields, as long as you have the "Save option" set to
  either "Tag" or "Both".
WorldFallz’s picture

wow-- that was fast. I'm away from my environment for a while but i have both HS and CT so I'll test it out and report back as soon as I can. Amazing-- thanks.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

vthirteen’s picture

Version: 5.x-3.0-rc3 » 6.x-3.x-dev
Status: Closed (fixed) » Active

i noticed that the [save-lineage-termpath-raw] saves the URL alias with dashes (-) between terms in the path, not slashes (/), as in termpath token. using slashes makes more sense to me.

vthirteen’s picture

Status: Active » Closed (fixed)