Last modified: 2007-06-29 20:23:19 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 T12391, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 10391 - action=help doesn't return help if format is not fancy markup
action=help doesn't return help if format is not fancy markup
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Roan Kattouw
http://en.wikipedia.org/w/api.php?for...
: patch, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-06-28 11:36 UTC by Stefan Bauer
Modified: 2007-06-29 20:23 UTC (History)
1 user (show)

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


Attachments
Outputs help message in non-fm formats if action=help is explicitly set (571 bytes, patch)
2007-06-28 12:49 UTC, Roan Kattouw
Details

Description Stefan Bauer 2007-06-28 11:36:09 UTC
action=help&format=json returns 
{"error":{"code":"help","info":""}}
but no help page.

Same output for action=help&version&format=json
Comment 1 Roan Kattouw 2007-06-28 11:40:37 UTC
Strange. format=jsonfm does work. I'll look into this.
Comment 2 Roan Kattouw 2007-06-28 12:41:38 UTC
This bug appears to occur for *all* non-fm formats.
Comment 3 Roan Kattouw 2007-06-28 12:49:45 UTC
Created attachment 3837 [details]
Outputs help message in non-fm formats if action=help is explicitly set

ApiMain.php, lines 213-215:

// Only print the help message when this is for the developer, not runtime
if ($this->mPrinter->getIsHtml())
	ApiResult :: setContent($errMessage, $this->makeHelpMsg());

It appears this is intentional behavior. I've attached a patch that detects whether the caller explicitly asked for help through action=help, and outputs the help message if that is the case.
Comment 4 Stefan Bauer 2007-06-28 14:36:20 UTC
Hmm, this behaviour was added in revision 22500, Mon May 28 06:59:19 2007 UTC - makes sense not to include the help page on every error in bot mode. Sorry, I had missed that change.
Comment 5 Roan Kattouw 2007-06-28 15:59:31 UTC
(In reply to comment #4)
> makes sense not to include the help page on every error in bot mode.
Concur. But when specifically asked for, the help message should be printed.

Comment 6 Roan Kattouw 2007-06-29 20:23:19 UTC
Fixed in r23566

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


Navigation
Links