1

If parent term url wasn't autogenerated. And children term url was generated using token [term:parents:join-path], it use wrong parent category url (autogenerated, but not real).

Imagint we have set Blog taxonomy terms URL aliases generation rule to be [term:parents:join-path]/[term:name]

And we have categories structure: "Parent Category" with URL "my-parent-category" filled by hands.

"Sub Category" we will get URL"parent-category/sub-category" but not "my-parent-category/sub-category".

So if you filled some parent category URL by hands, you would have to update each subcategory URL and nodes URLs as well (if your node URL structure use full path throw the terms)

apaderno
  • 28,547
  • 16
  • 75
  • 90
Rantiev
  • 2,121
  • 2
  • 32
  • 56

1 Answers1

1

Answered in https://www.drupal.org/node/2311207

[term:parents:*] defaults to all the names of all the parent terms. You are wanting the actual URL alias of the parent term itself, not all parents, which is a different token: [term:parent:url:path] I believe.

Dave Reid
  • 1,260
  • 7
  • 12
  • No, i just want to make so sub category link would use actual parent alias. What is link you want for your subcategory real? If you change your parent category URL by hands, you will want subcategories and posts use that link. Parent category link default - parent-cat-name Parent category link modified - modifyed-parent-cat-link Pathauto will generate - parent-cat-name/sub-cat-name instead of modifyed-parent-cat-link/sub-cat-name – Rantiev Jul 29 '14 at 08:04
  • So, thank you for your answer, but i don't think it will generate full path, include all the parents, not one. – Rantiev Jul 29 '14 at 08:07
  • If you use the pattern [term:parent:url:path]/[term:name] for all your terms starting with the first level root terms on down, then it will work. – Dave Reid Jul 30 '14 at 20:51
  • As usually it doesn't work. Because of specific case. blog/[term:parent:url:path]/[term:name] We will get blog/blog/term/sub-term – Rantiev Aug 07 '14 at 11:20
  • I need something like [term:parents:join-path] but that will use current parent alias, not autogenerate alias again. This is actually logical behavior. I hope you understand that. There is no need to generate parent path again, if parent actually has user-defined path, and it's path is different of what we would get if we would regenerate it again. – Rantiev Aug 07 '14 at 11:25