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... 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 3) Resolving it client-side
All three have their disadvantages: 1) Community outrage; additionally it needs more maintenance. The current system is pretty fool-proof. 2) The API consistently uses Title:newFromText to resolve the title. This function is used all over mediawiki, however, so changing it makes {{}} a valid construct. This changes parser behaviour, which is (iirc) not acceptable. The alternative would be to add a conditional for every call to newFromText. Mediawiki normally uses Wiki::checkInitialQueries to resolve '', but it's not possible to use that function. 3) Brr. 'Main Page' language tables.
Any ideas on how to solve this effectively?
-Merlijn