in drupal 7, there is a token available by entity token as [node:field_test:parents:join-path] for content type patterns.
for the cases like "category 1/sub category 1/title 1" , after Punctuation we have something like category-1/sub-category-1/title-1

but in drupal 8, ":parents:join-path" is not available for content type and [node:field_test:entity:parents] generate a simple array
so output is "category 1, sub category 1/title 1" .
we can't generate "category-1/sub-category-1/title-1" like drupal 7 after punctuation, because we need spaces in taxonomy to be converted to / and need them to be converted to - in title.

i think there is good idea to have something like [node:field-page-term:parents:join-path] in available token for content type patterns in drupal 8.

Comments

user1252762 created an issue. See original summary.

Berdir’s picture

Category: Feature request » Support request
Status: Active » Fixed

Field tokens are working fine, as do referenced entity tokens, you just need use the right token. It's basically the same as the API, which means field_test:entity:parents:join-path

Status: Fixed » Closed (fixed)

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

boesbo’s picture

Priority: Normal » Critical

Set: [node:field_categoria:entity:parents] generates this error:
Path pattern is using the following invalid tokens: [node:field_categoria:entity:parents].

vdsh’s picture

For those landing on this topic, join-path doesn't seem to be working anymore. Instead I am using join:/

Eg: [node:field_location:entity:parents:join:/] for me. When using this with pathauto, I also need to indicate that / characters are not removed from generated url

Nelo_Drup’s picture

#5 Thank you very much this really helped me a lot it still works in drupal 9.5.7, that should be as a token or something easy to find