Last modified: 2011-04-30 01:16:44 UTC
I notice many of the examples on api.php hardwire in a "Main%20Page". The problem is on many wikis other than English ones, that page won't exist. Hence the user cannot just click to try the example. He must edit the URL. Perhaps choose a page that is sure to exist. Maybe some MediaWiki:... page. Also if it does exists, well it is usually quite large. Another idea would be to dynamically link whatever the Main Page is called according to $wgLanguageCode.
(In reply to comment #0) > I notice many of the examples on api.php hardwire in a "Main%20Page". > > The problem is on many wikis other than English ones, that page won't exist. > > Hence the user cannot just click to try the example. He must edit the URL. > > Perhaps choose a page that is sure to exist. Maybe some MediaWiki:... page. > > Also if it does exists, well it is usually quite large. > > Another idea would be to dynamically link whatever the Main Page is called > according to $wgLanguageCode. > The latter would involve grabbing [[MediaWiki:mainpage]] from the message cache for each help view, which feels overdone to me. The other problem is that there aren't any pages that are sure to exist; [[Template:!]] would probably be a good candidate, but that page typically doesn't have an interesting history. Also note that other examples than [[Main Page]] are used: [[API]], [[Image:Albert Einstein Head.jpg]] (whoops, that should be File:, corrected in r48215),[[Image:Test.jpg]], [[Albert Einstein]], [[Category:Foo]], [[Category:Bar]], [[Category:Physics]], [[User:Alice]], [[User:Bob]], [[Template:Stub]], [[User:YurikBot]], [[User:brion]] (who doesn't exist, Brion's username is Brion VIBBER), [[User:TimStarling]], 217.121.114.116 (which happened to be my IP at the time of writing that module). Most of these are metanames (Foo, Bar, Alice, Bob), English names (Physics, Stub) or Wikipedia-specific stuff (YurikBot, TimStarling). They're intended to be, and for most of these there's no quick, language- and wiki-independent alternative that doesn't require hitting the message cache. Closing as WONTFIX because of performance concerns and limited use.