Page MenuHomePhabricator

WP detect links fail on some wikipedia urls
Closed, ResolvedPublic

Description

the detect links work when the language is given, but it doesn't work for the following case

  1. https://wikipedia.org/wiki/Cat, this doesn't convert to preview link
  2. https://m.wikipedia.org/wiki/Cat, this convert a fail preview link
  3. https://en.m.wikipedia.org/wiki/Cat, this works fine.

the current accepted link regex is here, these links expecting to have a english preview link with title cat.

this should also accept (language with dash -), for example https://be-tarask.wikipedia.org/wiki/Фрыдрых Шылер

QA Results - WordPress Dev

Event Timeline

hueitan renamed this task from WP detect links fail on some wikipedia url to WP detect links fail on some wikipedia urls.Apr 5 2024, 7:43 AM
hueitan updated the task description. (Show Details)
PWaigi-WMF triaged this task as Medium priority.Apr 5 2024, 5:11 PM

@hueitan All preview links work with the different case scenarios from each test link below. I will move this to Design Sign-off. Thanks for all your work!

Status: ✅PASS
Environment: WordPress Dev- 6.5.2; Wikipedia Preview version 1.10.0 (38ae85e)
OS: macOS Sonoma 14.4.1
Browser: Chrome 123, Firefox 124, Safari 17.4
Skins. N/A
Device: MBA M2
Emulated Device:: n/a
Test Links:
https://wikipedia.org/wiki/Cat
https://m.wikipedia.org/wiki/Cat
https://en.m.wikipedia.org/wiki/Cat
https://be-tarask.wikipedia.org/wiki/Фрыдрых
https://zh-min-nan.wikipedia.org/wiki/Heng-ta%CC%8Dt_Hoat-ti%C4%81n-chhi%C3%BA%E2%81%BF

✅AC1: https://phabricator.wikimedia.org/T361910

ChromeSafariFirefox

@GMikesell-WMF I am wondering if we have to test it for short URLs too? e.g. https://w.wiki/Wz6 or URLs formed using the page id such as this - https://en.wikipedia.org/?curid=6678

@GMikesell-WMF I am wondering if we have to test it for short URLs too? e.g. https://w.wiki/Wz6 or URLs formed using the page id such as this - https://en.wikipedia.org/?curid=6678

These two cases are stretching the boundaries of the detect feature since you cannot really tell from looking at the URL, you have to actually request them to know what they resolve to.

I would call them out of scope in this task but certainly valid ideas for the future if we have any indications that it's a valid use case for some users.

@GMikesell-WMF I am wondering if we have to test it for short URLs too? e.g. https://w.wiki/Wz6 or URLs formed using the page id such as this - https://en.wikipedia.org/?curid=6678

These two cases are stretching the boundaries of the detect feature since you cannot really tell from looking at the URL, you have to actually request them to know what they resolve to.

I would call them out of scope in this task but certainly valid ideas for the future if we have any indications that it's a valid use case for some users.

Make sense, Thanks Stephane, moving it to product signoff.