Last modified: 2012-04-16 09:16:08 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 T30500, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 28500 - api returns missing title value on simple chinese titles although index.php redirects to correct title
api returns missing title value on simple chinese titles although index.php r...
Status: RESOLVED WORKSFORME
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
unspecified
All All
: Normal major (vote)
: ---
Assigned To: Roan Kattouw
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-04-11 23:06 UTC by merl
Modified: 2012-04-16 09:16 UTC (History)
5 users (show)

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


Attachments

Description merl 2011-04-11 23:06:28 UTC
If you request http://zh.wikipedia.org/wiki/京奉铁路正阳门东车站 you will be redirected to http://zh.wikipedia.org/wiki/京奉鐵路正陽門東車站

But if you request http://zh.wikipedia.org/w/api.php?action=query&prop=info&titles=%E4%BA%AC%E5%A5%89%E9%93%81%E8%B7%AF%E6%AD%A3%E9%98%B3%E9%97%A8%E4%B8%9C%E8%BD%A6%E7%AB%99 a missing error is returned and no hint is given that this page could be found at http://zh.wikipedia.org/w/api.php?action=query&prop=info&titles=%E4%BA%AC%E5%A5%89%E9%90%B5%E8%B7%AF%E6%AD%A3%E9%99%BD%E9%96%80%E6%9D%B1%E8%BB%8A%E7%AB%99

So this rewritting must be implemented on all clients at the moment which could be fault-prone because every client must implement its own rewritting. A server implementation would also prevent problems on future changes if new languages are added.

I think in this case api should return the same result as this is done on utf-8 normalisation on ml or ar:

If you request http://ml.wikipedia.org/wiki/അനിമേഷന്http://ml.wikipedia.org/wiki/അനിമേഷൻ is returned and http://ml.wikipedia.org/w/api.php?action=query&titles=%E0%B4%85%E0%B4%A8%E0%B4%BF%E0%B4%AE%E0%B5%87%E0%B4%B7%E0%B4%A8%E0%B5%8D%E2%80%8D returns the correct page with a different title than requested.
Comment 1 merl 2011-04-12 00:32:00 UTC
According to $wgDisableLangConversion zhconversion is disabled on zhwikiquote but a client is not able to request this information from api.
So a client won't know if it should use conversion on a wiki without having this information hard coded by developer at the framework.
Comment 2 Roan Kattouw 2011-04-12 10:00:38 UTC
Use the &converttitles parameter. It's safe to use on wikis with language conversion disabled, because it'll just be ignored in that case.

https://secure.wikimedia.org/wikipedia/zh/w/api.php?action=query&prop=info&titles=%E4%BA%AC%E5%A5%89%E9%93%81%E8%B7%AF%E6%AD%A3%E9%98%B3%E9%97%A8%E4%B8%9C%E8%BD%A6%E7%AB%99&converttitles

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


Navigation
Links