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.
Steps to reproduce
- Create a content type with a link field (https://www.drupal.org/project/link)
- Enable entity translation and make the link field translatable
- On the manage display page, go to the custom wrappers tab and select "Tokens". In the custom link field, add something like [node:field-link:url]
When viewing this node, the wrapper link is always the value of the default language because the current language is not passed in the token_replace function.
What do you think?
Comment | File | Size | Author |
---|---|---|---|
#2 | fix-custom-wrapper-url-token-replacement.patch | 770 bytes | RAWDESK |
wrapper_link_token_entity_translation.patch | 662 bytes | JeroenT |
Comments
Comment #1
aspilicious CreditAttribution: aspilicious commentedThat's the same for all the token replace calls?
Comment #2
RAWDESK CreditAttribution: RAWDESK for Colruyt Group Services commentedHi,
I came up with the same patch before i found this issue. Only applied some more readable coding standards :)
@aspilicious,
No this patch only fixes the custom wrapper token rendering.
The only place that still might have translation issues for tokens is this function i am not sure about it has a language sensibility :
Comment #3
RAWDESK CreditAttribution: RAWDESK for Colruyt Group Services commentedComment #4
RAWDESK CreditAttribution: RAWDESK for Colruyt Group Services commentedReviewed and tested.
Comment #5
nico.knaepen CreditAttribution: nico.knaepen at Logic in Motion for Colruyt Group Services commentedReviewed & tested.