- Issue created by @Stockticker
Applies to Linkit field widget (not CKEditor):
External links from the same domain, but within different language contexts, are treated as "internal", and as a result - are stored as internal:/node/NID
in the database. Then, when displaying, it might lead to situations, when a rendered link is displayed in a wrong language context.
LinkitWidget::massageFormValues()
- it gets automatically transformed to an internal URI, despite the link has been inserted as external. Maybe it should work like that, when, indeed, the external URL points to the same language as the current request language. But if compared to a default "Link" field widget, provided by core - that widget does not convert external URLs to internal.
Providing a patch, which converts external URLs only in case it points to the same language as the current request language. Otherwise, IMHO, it makes no sense to convert it to internal, as later on, when displaying a link in a formatter/template - it will lead
to a situation when a link does not take into account a language prefix of a linked internal node.
Needs review
7.0
Code