Score:0

Node url alias pattern based on taxonomy not working properly

gu flag

I have taxonomy named Category with two terms: News and Articles.

Articles term has custom url alias - /useful.

The website was upgaded from D7 to D9. On old D7 version node url pattern was [node:field_categories]/[node:title]

On D9 it is the same pattern, BUT instead of /useful/node-title it dispalays /articles/node-title

Maybe it is not a big deal, but after porting to D9 I would like to maintain current URL structure without changing it radically.

I've tried some other tokens, for example [node:field_categories:entity:url], but it displays absolute path to term with domain and https after slash like site.com/https://site.com/taxonomy-alias which is incorrect.

How to fix this?

Kevin avatar
in flag
Are you sure the token is the same?
bigboy avatar
gu flag
@Kevin Yes. Moreover. tried all other available tokens without any luck.
Score:0
gu flag

Finally, found an answer!

The correct token for D8/9 is [node:field_categories:entity:url:path]

I don't know why, but it is not listed in available tokens.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.