Last modified: 2011-04-30 01:16:44 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 T19870, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 17870 - api.php Main Page examples might not exist
api.php Main Page examples might not exist
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
1.14.x
All All
: Lowest trivial (vote)
: ---
Assigned To: Roan Kattouw
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-03-09 01:52 UTC by Dan Jacobson
Modified: 2011-04-30 01:16 UTC (History)
3 users (show)

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


Attachments

Description Dan Jacobson 2009-03-09 01:52:33 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.
Comment 1 Roan Kattouw 2009-03-09 10:50:08 UTC
(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.

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


Navigation
Links