4 Aug 2009 19:44
'' -> 'Main Page' title substitution
Merlijn van Deen <valhallasw <at> gmail.com>
2009-08-04 17:44:55 GMT
2009-08-04 17:44:55 GMT
Hello all, An empty page title is a non-normalized name for 'Main Page' in mediawiki (except for 'delete' actions). This is most notable in the interwiki links from 'Main Page': http://en.wikipedia.org/w/api.php?action=query&prop=langlinks&titles=Main%20Page returns (...) <page pageid="15580374" ns="0" title="Main Page"> <langlinks> <ll lang="ar" xml:space="preserve" /> <ll lang="bg" xml:space="preserve" /> <ll lang="ca" xml:space="preserve" /> <ll lang="cs" xml:space="preserve" /> These links give the correct page when used as interwiki link ([[ar:$1]] resolves to http://ar.wikipedia.org/wiki/$1). Resolving these pages using the API is impossible, however. It is possible to ask for an empty title, but this yields http://en.wikipedia.org/w/api.php?action=query&prop=langlinks&titles=| (...) <pages> <page title="" invalid="" /> </pages> There are three possible solutions for this: 1) Changing the interwiki links to link to the correct main page 2) Letting the API resolve empty titles(Continue reading)
RSS Feed