Page MenuHomePhabricator

Special:ApiSandbox JavaScript error if API module doesn't supply parameters
Closed, ResolvedPublic

Description is work in progress for a new API. It works: api.php?action=query&prop=flow&titles=Talk:Main_Page returns something. However, because this API module doesn't implement getAllowedParams() and getParamDescription(), Special:ApiSandbox has errors if you try to invoke it. If I choose action=query, prop=flow, "Loading..." spins forever, the [Make Request] button remains disabled, and the browser console shows the error

TypeError: this.params is undefined http://localhost/wiki/extensions/ApiSandbox/resources/UiBuilder.js Line 62

The fix is for ApiSandbox's JS to handle an absent parameters list. It would be nice if it warned "<modulename> does not supply allowed parameters".

Version: master
Severity: normal



Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 3:03 AM
bzimport set Reference to bz61793.
bzimport added a subscriber: Unknown Object (MLST).

Change 114916 had a related patch set uploaded by Spage:
Handle API module with no parameters

Change 114916 merged by jenkins-bot:
Handle API module with no parameters