Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When using metatag_hreflang with domain_access (each domain a different default language), I can get the "x-default" url to work. But the alternatives, [node:url-nl] etc. never show up for translated nodes.
Also x-default doesn't show the aliased url, only the raw http://.../node/x url.
Is this a problem with tokens or with metatag?
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedmorningtime created an issue. See original summary.
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedComment #3
DamienMcKennaIt might be a subtle combination of different things. What token are you using as the x-default? Are you using Entity Translation for handling the node translations or the core Content Translation module?
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedx-default is [node:source:url]
Others [node:url-de]
If I add all the URLs manually from the node/edit screen, I get the expected results.
It seems the token [node:url-de] etc. fails to render? And the [node:source:url] fails to get the path alias.
Comment #5
DamienMcKennaAgain, are you using Entity Translation or Content Translation to manage the translations? It make a big difference.
Comment #6
Anonymous (not verified) CreditAttribution: Anonymous commentedContent Translation plus whatever i18n modules, not using Entity Translation. Should I switch?
Comment #7
DamienMcKennaI'm going to write some tests to confirm what works and what doesn't, but I'm going to move this over to #2627598: Custom tokens for hreflang not working first.