Closed (fixed)
Project:
Link checker
Version:
2.1.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
18 Jan 2023 at 17:36 UTC
Updated:
26 Feb 2025 at 18:19 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
gngn commentedPatch as proposed above.
Feedback welcome.
Comment #3
eiriksmVery cool, thanks! ❤️
Are you able to write a small test for this as well?
Comment #4
gngn commented@eiriksm thank you :)
About "a small test for this" ... I can give it a try (I don't have much experience with drupal tests though).
Comment #5
gngn commentedI still have no test - but I tested a bit.
Turns out I forgot to check if the $linked_entity actually has the translation.
So #2 fails e.g. with a pararaph embedded in an untranslated node.
Fixed.
Comment #6
carlitus commentedThe patch #5 works well for me. Attached screenshots:
The field in english:

The field in spanish:

Reports without patch, where it shows the link to wrong language:

Reports with the patch, where it shows the link to right language:

Thanks @gngn!
Comment #7
lisotton commentedI tested and it works fine.
Moving to RTBC also according to @carlitus evidences.
Comment #8
eiriksmStill needs tests ✌️🤓
Also, please use a merge request so the testing pipelines can run
Comment #9
shivam_tiwari commentedI am working here.
Comment #11
shivam_tiwari commentedComment #14
shivam_tiwari commentedCreated MR 106 for the latest development version. Pipeline is green so moving it to Needs Review.
Comment #16
eiriksmAlright looks simple enough. Let's do tests in a follow up
Thank to everyone who worked on this! ♥️🚀
Comment #17
eiriksmCreated https://www.drupal.org/project/linkchecker/issues/3506219 for the tests
Comment #18
c-logemannComment #19
c-logemannOh, was already connected as parent issue. Sorry for the noise.