Postponed (maintainer needs more info)
Project:
Pathauto
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Jun 2026 at 13:38 UTC
Updated:
9 Jul 2026 at 17:29 UTC
Jump to comment: Most recent
Comments
Comment #2
mlncn commentedComment #3
shank115 commentedWhen you create a custom entity, the name of the token type in
hook_token_info()must be exactly the same as the name returned bytoken.entity_mapperfor that entity. If the names don't match, Pathauto won't recognize the tokens, and its token browser will appear empty for that entity.Example:
Entity type ID is
demo_productTry it something like this:
Comment #4
berdirtoken UI is always meant to show only the token types that are provided plus those that are global. If it's a token type for your entity type then yes, make sure it either matches the entity type or define the mapping per #3.
Comment #5
mlncn commentedBundle-Scoped Entity Tokens provides tokens per bundle, and declares node ones to be 'node' tokens. So it does match the entity type and i would expect them to show up in Pathauto.
I'll admit that pathauto really doesn't need these tokens, because patterns are defined per-bundle anyway. (It was just i was looking in Pathauto to see if my module was working lol.)
(What would be useful and cool, but i know cannot happen without some very custom not-in-Drupal-core way to alter Pathauto's behavior, is that if Bundle-Scoped Entity Tokens are available then only show the bundle-scoped entity tokens for the current pattern, so you only see the applicable fields when defining your pattern and not Article fields for a Page pattern etc.)