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.
The custom tokens in the hreflang module currently support Entity Translation, they need to also support Content Translation.
Comment | File | Size | Author |
---|---|---|---|
#10 | Screen Shot 2018-04-02 at 12.13.40 PM.png | 114.43 KB | jennypanighetti |
#8 | metatag-n2832101-8.interdiff.txt | 2.16 KB | DamienMcKenna |
#8 | metatag-n2832101-8.patch | 3.57 KB | DamienMcKenna |
|
Comments
Comment #2
ericdsd CreditAttribution: ericdsd commentedHi
subscribing to this need too.
[node:url-fr] doesn't work with content translation,
does someone have a quick workarround that could make it before this issue is addressed ?
Or maybe another module that could do the trick for hreflang only ?
Thanks
Comment #3
jennypanighetti CreditAttribution: jennypanighetti commentedDoes anybody have a solution for this? I get NO output in my translated nodes' metatags for alternate language URLs. This needs to work.
Comment #4
DamienMcKennaWhat needs to be done is metatag_hreflang_tokens() needs to be expanded to handle Content Translations, there isn't really a workaround, someone just needs to take the time to build the changes.
Comment #5
DamienMcKennaOut of interest, does this work for you?
Comment #6
jennypanighetti CreditAttribution: jennypanighetti commentedOoh! Yes, actually, it did fix it!! Wow, thank you!
Comment #7
jennypanighetti CreditAttribution: jennypanighetti commentedThe only issue I see now (and this is probably a larger issue) is that, it does not take the "Published" status into account. If the English node is published but the British one is not, the English node will output an hreflang for en-gb - even if that content is inaccessible to users.
If this aspect should be moved into its own issue, let me know...
Comment #8
DamienMcKennaI'm very happy to hear that it's working for you! You bring up a good point about unpublished content, so lets do it this way.
Comment #9
DamienMcKennaComment #10
jennypanighetti CreditAttribution: jennypanighetti commentedYes, that worked, thank you!
I think your -8 patch is missing one of the checks for $translation->status. See screenshot. I added it into my version and it works well.
-Jenny
Comment #12
DamienMcKennaAwesome! Committed.
FYI I spun off a separate issue for test coverage.