Last modified: 2014-08-05 19:41:16 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T53753, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 51753 - Links with language variants can't automatically jump to mobile sites
Links with language variants can't automatically jump to mobile sites
Status: RESOLVED FIXED
Product: Wikimedia
Classification: Unclassified
Site requests (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: mobile
: 66080 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-20 16:31 UTC by fireattack
Modified: 2014-08-05 19:41 UTC (History)
15 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description fireattack 2013-07-20 16:31:58 UTC
Links such as http://zh.wikipedia.org/zh/克莱斯勒 cannot automatically jump to mobile version with a mobile user agent. Links like http://zh.wikipedia.org/wiki/克莱斯勒 http://en.wikipedia.org/wiki/Chrysler work pretty well.

The most unfortunate thing is, Google indexed all the /zh/ links instead of /wiki/'s (just search "克莱斯勒 wikipedia" in Google). That means if you use Google to search a Chinese wikipedia page on mobile phone, you have to open a desktop version of that page at the first time, and then manually change to mobile version.

I don't think we have this problem years ago.
Comment 1 Andre Klapper 2013-08-14 12:01:05 UTC
Likely related to bug 52429, might even depend on it.
Comment 2 Liangent 2013-08-14 12:13:08 UTC
Huh is this (Google index) the cause of that issue that I tagged as worksforme in zhwiki VPT?
Comment 3 Max Semenik 2013-08-15 16:55:59 UTC
(In reply to comment #1)
> Likely related to bug 52429, might even depend on it.

No, it's not - the cause is the regex that explicitly redirects only URLs with /wiki/. I wonder how this (so horrible that I'm even proud of writing half of it) regex can be tweaked? (wiki|zh|zh-cn|...) is the most straightforward way, however it's prone to going out of sync with reality if we ever add new variants.
Comment 4 fireattack 2013-10-21 20:02:49 UTC
This problem keeps going, but I found something interesting about interacting between wikipedia and google search's page.

(all the test is based on: use google.com search "克莱斯勒 wikipedia" and then click the first result to see if it can be redirected to the right mobile site)
In chrome of android, you can correctly redirected to http://zh.m.wikipedia.org/wiki/%E5%85%8B%E8%8E%B1%E6%96%AF%E5%8B%92 after an url jump.

With desktop Chrome + android's version's UA (I use Mozilla/5.0 (Linux; Android 4.1.1; Nexus 7 Build/JRO03D) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Safari/535.19, by User-Agent Switcher for Chrome to change it. It's one of default options), you can be redirected correctly as well. But if you use other UA like iPhone/iPad/WP7, it doesn't work.

Note that the redicted link made by google (https://www.google.com/url?sa=t&rct=j&q=%E5%85%8B%E8%8E%B1%E6%96%AF%E5%8B%92%20wikipedia&source=web&cd=1&ved=0CC4QFjAA&url=http%3A%2F%2Fzh.wikipedia.org%2Fzh%2F%25E5%2585%258B%25E8%258E%25B1%25E6%2596%25AF%25E5%258B%2592&ei=j4NlUr73FuPL2gWyhoCAAQ&usg=AFQjCNFYeATKi3bLRCxwbSpe3WQDg5xtgw&sig2=9VFMREvo3wk6fmSNK-hywQ&bvm=bv.54934254,d.b2I) is essential. If you use some add-on/script to remove it, it can't be redirected at all just like click directly on http://zh.wikipedia.org/zh/克莱斯勒 .

It doesn't happen in Firefox, either desktop or android version. In desktop, you can try any of mobile UA (includes the above android chrome one), you will be never redirected to correct mobile page.

The debug info in Chrome may be help (you can reproduce it yourself easily though):
http://snag.gy/neeNH.jpg
Comment 5 Liangent 2013-10-22 07:02:05 UTC
(In reply to comment #4)
> This problem keeps going, but I found something interesting about interacting
> between wikipedia and google search's page.

In case you don't know, zhwiki has a script: https://zh.wikipedia.org/wiki/MediaWiki:Gadget-variant-link-fix.js
Comment 6 Liangent 2014-06-03 16:11:20 UTC
*** Bug 66080 has been marked as a duplicate of this bug. ***
Comment 7 Gerrit Notification Bot 2014-06-04 22:38:00 UTC
Change 137476 had a related patch set uploaded by MaxSem:
Redirect language variant URLs to mobile

https://gerrit.wikimedia.org/r/137476
Comment 8 Gerrit Notification Bot 2014-06-05 20:19:01 UTC
Change 137476 merged by BBlack:
Redirect language variant URLs to mobile

https://gerrit.wikimedia.org/r/137476
Comment 9 Tomasz W. Kozlowski 2014-08-05 19:41:16 UTC
The link in comment 0 looks fine to me now, assuming this was fixed by the above patch. Please do feel free to reopen if that's not the case.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links