Last modified: 2009-01-16 11:08:21 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 9143 - api.php opensearch returns only JSON
api.php opensearch returns only JSON
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
  Show dependency treegraph
Reported: 2007-03-01 20:34 UTC by Josh Hight
Modified: 2009-01-16 11:08 UTC (History)
1 user (show)

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


Description Josh Hight 2007-03-01 20:34:41 UTC
Querying api.php using opensearch action returns only JSON responses and sends a
header that causes browsers to download the response as if it were a file. The
format parameter is ignored. Using opensearch should return the response in
xfhtml by default, like other actions, or return the response in a format
specified. The header forcing download should be removed.

Try for yourself:
Comment 1 Andrew Garrett 2007-03-19 05:04:01 UTC
OpenSearch implementation in api.php is just that - an implementation of the
OpenSearch standard, which specifies the behaviour you've identified.

Comment 2 Aryeh Gregor (not reading bugmail, please e-mail directly) 2007-03-20 00:54:41 UTC
From skimming the protocol it appears that any formatting is permitted for the response:

No?  The term "JSON" doesn't even appear in the spec.
Comment 3 Josh Hight 2007-03-21 14:38:52 UTC
OpenSearch has nothing to do with JSON, directly. That spec gives an example of
an RSS/Atom OpenSearch response, for example.

Any idea when this will get out of WONTFIX status?
Comment 4 Robert Leverington 2007-03-21 15:31:03 UTC
Generally WONTFIX means something will *never* be implemented.
Comment 5 Rob Church 2007-03-21 20:04:28 UTC
(In reply to comment #4)
> Generally WONTFIX means something will *never* be implemented.

This bug should not have been marked WONTFIX, however, per Simetrical in comment
2 - the developer closing the bug failed to read the documentation.
Comment 6 Yuri Astrakhan 2007-05-19 02:16:54 UTC
Please do not confuse the open search protocol (used by search engines + clients), and the specific suggestions type  application/x-suggestions+json

That document does not define suggestions format. Google + Firefox & IE have been using it in the exact form as implemented by action=opensearch.

I think the biggest problem is the name -- this is not open search but open search suggestions action. (a bit too long for my taste though).

On the other hand, this action can be improved to allow for query history or any other features implemented. But first, the protocol will need to be defined, and i couldn't find anything specific yet.

Some References:


Multiple formats discussion (includes an interesting idea for returning last user's queries together with the results):

Yahoo search suggest uses a format argument (they apparently are using a similar API interface model):

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