Page MenuHomePhabricator

api returns missing title value on simple chinese titles although index.php redirects to correct title
Closed, DeclinedPublic

Description

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.


Version: unspecified
Severity: major

Details

Reference
bz28500

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:25 PM
bzimport set Reference to bz28500.

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.