In a multilingual site, in a view displaying teasers of nodes that have language set to "not specified", the title of the node links to the default language version of the node. Same thing happens when using fields, for example the "link to content" field.
The correct behaviour should be to maintain the current interface language, right?
Comments
Comment #2
pmusaraj commentedI found a temporary fix to this issue, added the following code in a hook_preprocess_node()
Comment #3
swentel commentedI think this is the same as in #2648288: StringFormatter generates links in wrong language when linking to entity (which links to several others)
Comment #8
svdhout commentedThe language negotiator for url as a procesOutbound method that does not add the language when the entity language is set to 'not specified' or 'not aplicable'.
The patch at https://www.drupal.org/project/drupal/issues/2883450#comment-12116998 solves the issue for me.
Comment #17
quietone commentedThis was a bugsamsh triage target today.
smustgrave pointed out that this is likely a duplicate of #2883450: Missing url prefix on language neutral content or #2648288: StringFormatter generates links in wrong language when linking to entity. mstrelan and I tested with umami. And we both think this is a duplicate of the first one. mstrelan also suggested updated the IS in that issue to use umami because it is pre-configured. I will update that issue as well.