Last modified: 2012-07-01 13:45:44 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 T23975, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 21975 - Add Support for languages with variant URLs
Add Support for languages with variant URLs
Status: RESOLVED WORKSFORME
Product: Wikimedia Mobile
Classification: Unclassified
Generic (Other open bugs)
--
All All
: Normal major (vote)
: ---
Assigned To: Nobody - You can work on this!
http://zh.m.wikipedia.org/wiki/%E4%BA...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-12-31 11:22 UTC by Liangent
Modified: 2012-07-01 13:45 UTC (History)
4 users (show)

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


Attachments

Description Liangent 2009-12-31 11:22:03 UTC
Sometimes I find links to /zh-tw/Article_name, which are unusable (Page not found) on Wikipedia Mobile, such as <http://zh.m.wikipedia.org/zh-tw/%E7%9B%B4%E6%B5%81%E9%9B%BB>.

Note that <http://zh.wikipedia.org/zh-tw/%E7%9B%B4%E6%B5%81%E9%9B%BB> works.
Comment 1 Derk-Jan Hartman 2009-12-31 11:53:03 UTC
On which pages are you finding those links ?
Comment 2 Liangent 2009-12-31 12:04:39 UTC
On zhwiki (and srwiki etc.), we have the setting like:

    $wgArticlePath = "/$2/$1";

In MediaWiki's parser, $2 will be replaced with a variant code of the content language of this wiki if available, and this path is equivalent to /w/index.php?title=$1&variant=$2.

That's to say, once MediaWiki's parser decides to generate a link with a variant parameter, such broken link will be generated. The condition varies, such as whether the user is anonymous, whether variant= exists in the URL of the request, or what Accept-Language header the user requests with, and so on.
Comment 3 Derk-Jan Hartman 2009-12-31 12:07:40 UTC
What I meant was, are you opening such URLs and being redirected to the broken version of the URL mobile page, or do you find these links inside the text of pages presented by the mobile interface. Those are 2 different issues.
Comment 4 Liangent 2009-12-31 12:10:55 UTC
Such URLs like <http://zh.m.wikipedia.org/zh-tw/%E7%9B%B4%E6%B5%81%E9%9B%BB> are generated by the parser from [[WikiLink]]s in articles.
Comment 5 Derk-Jan Hartman 2010-01-07 14:48:25 UTC
With http://github.com/hcatlin/wikimedia-mobile/commit/f2959482bbee8cfd99e07daeb83083c9118900fe

the router now recognizes variant urls and will retrieve the /wiki/ version of that article. Next step is to retrieve the variant version of the page perhaps, but we don't have a way to switch variants yet, so we probably need to think about that before we apply variants.
Comment 6 Derk-Jan Hartman 2010-02-10 13:25:33 UTC
Note to self: http://zh.m.wikipedia.org/w/index.php?title=\u4e2d\u6587&variant=zh-hans already works.

BUT

http://zh.m.wikipedia.org/w/index.php?title=\u4e2d\u6587&variant=zh-hant

Does not work, because memcached doesnt account for variants.
Comment 7 Derk-Jan Hartman 2010-02-14 16:53:31 UTC
Fixed in http://github.com/hcatlin/wikimedia-mobile/compare/3fef6d6...00ea7a3
Comment 8 Jimmy Xu 2010-06-09 03:19:21 UTC
I don't know whether this is a deploy problem, but at least http://zh.m.wikipedia.org/wiki/%E8%A1%8C%E5%88%97%E5%BC%8F?variant=zh-hans is not working (page still shown with no variant).
Comment 9 Liangent 2010-06-09 04:56:27 UTC
Do not expect mobile site to accept as many parameters as main sites. /zh-hans/ is designed to be supported, and this is expected to be the only style of URLs generated by mobile sites parsers.
Comment 10 Jimmy Xu 2010-06-09 05:00:36 UTC
Well...

Neither http://zh.m.wikipedia.org/zh-cn/ nor http://zh.m.wikipedia.org/zh-cn/::Home works.
Comment 11 Liangent 2010-06-09 06:35:21 UTC
Home is really a bug.

Besides, please generate /zh-hans/ links if user is viewing pages with /zh-hans/ URLs.
Comment 12 Derk-Jan Hartman 2010-06-17 11:51:53 UTC
It seems that all my changes have disappeared recently...
Looking into it.
Comment 13 Derk-Jan Hartman 2010-06-17 12:18:24 UTC
It seems this only affects the ::Home page right ?
Comment 14 Jimmy Xu 2010-06-17 12:27:37 UTC
(In reply to comment #13)
> It seems this only affects the ::Home page right ?

AFAICS ::Home is working right now. Actually http://zh.m.wikipedia.org/zh-hans/ is failing, which jumps back to http://zh.m.wikipedia.org/.
Comment 15 Derk-Jan Hartman 2012-07-01 13:45:44 UTC
The functionality of the links is now fixed in MobileFrontend. I created ticket 38101 for the switching of the variants.

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


Navigation
Links