Linking image is not working in translated pages

Created on 24 May 2024, 5 months ago

Problem/motivation

We have a multilingual site and the problem is whenever we try to link an image in a translated page through ckeditor5, say, Spanish(es), the link does not set to - /es/node/123 but instead /node/123. Hence, the image always takes us to the default English page but it should ideally linked to the translated page. We are using Drupal 10.2.6 version and linkit module version is 7.0.0-alpha1.

No issues with linking text at all.
I have checked some media-related issue queues but, I am not sure whether this issue is related to - https://www.drupal.org/project/linkit/issues/3354873 🐛 Direct URL to media file entity does not work because relative URL does not pass URL path validation Fixed

Steps to reproduce

1. Create a node with any content type having ckeditor5 and linkit enabled.
2. Add some content with a title - "Test en". Get it translated - "Test es". Let's say the URL is /node/123.
3. Create another node. Add an image in the ckeditor5 through the File Browser plugin and link it to the above node(Test en)- /node/123. It works well with the default language.
4. Get the above node translated. Hover over the image and you will see /node/123 but it should be /es/node/123.
5. Try to edit the linkit and add "Test es" node. After adding, it is supposed to link to /es/node/123 instead of /node/123.

🐛 Bug report
Status

Active

Version

7.0

Component

Code

Created by

🇮🇳India niral098 Pune

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024