Last modified: 2014-11-14 09:25:09 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 T47811, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 45811 - Unable to use empty string as parameter (Required for continue=)
Unable to use empty string as parameter (Required for continue=)
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
ApiSandbox (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-03-06 22:52 UTC by Yuri Astrakhan
Modified: 2014-11-14 09:25 UTC (History)
4 users (show)

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


Attachments

Description Yuri Astrakhan 2013-03-06 22:52:03 UTC
We need an ability to pass an empty string parameter, such as api.php?continue=&... -- this is especially critical with the new "continue" param that enables the simplified continue mode (empty string), or will be used in the subsequent api calls as a regular string returned from previous call.

Implementation proposal:

Every string parameter should have a checkbox in front of the text field (to allign with the boolean parameters).
* User can set the checkbox to mean "send an empty string as value"
* Starting to type in the text field should automatically set the checkbox.
* Deleting text in the field would clear the checkbox.
* Clearing the checkbox should delete all text.
Comment 1 Kevin Israel (PleaseStand) 2013-03-07 06:30:21 UTC
Why is the magic value "" instead of something like "start"? To save bytes?
Comment 2 Yuri Astrakhan 2013-03-07 07:48:00 UTC
(In reply to comment #1)
> Why is the magic value "" instead of something like "start"? To save bytes?

:) No, but I didn't think the sandbox would not let me pass in an empty string value as a parameter. Also, there could be other modules that I am not aware of that may allow empty string parameters. That's why i think apisandbox should be able to handle such cases. This was also anomie's opinion when discussed on IRC.

There was a number of other ideas - always return the "continue" element in addition to "query-continue" in the result, unless there was a "continue" parameter. Or add a "string|bool" api parameter type, and let apisandbox handle that as described above, while keeping all other strings as non-empty.

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


Navigation
Links