I have a content type with two taxonomy entity reference fields. Both are required fields that only allow one value. I have path_auto and token enabled. I would like to use them to set the path of the node type.
This is the path pattern that is a problem:
It looks close to the answer given in another questionn here.
Result: The only thing showing up in the path is the title.
Versions: Drupal 8.8.5, pathauto 1.8, token 1.7
What have I tried?
I tried running the code through the debugger and found out that the action is in the functions
Token::generate(). I see that the three tokens are found and that a Node data is passed to Token generate. Then the
generate function runs
$replacements = $this->moduleHandler->invokeAll('tokens', [$type, $tokens, $data, $options, $bubbleable_metadata]). There were 9 modules found that implement hook_tokens but the only one returning any data is node_tokens. Looking at that code I don't see any attempt to return fields.
I also found an issue on the token module that indicated that I might be missing Token view modes. I was indeed missing a token view mode for my two taxonomy vocabularies so I created them. I added each field in the vocabulary including "name" in plain text.
I also tried to guess that the node needed to be converted to an entity to grab it's fields:
That was an invalid pattern.
Question: What is the correct pattern or what else do I need to configure?