Page MenuHomePhabricator

Exception Caught: Internal error in ApiResult::setElement: Attempting to add element suggestion=foo, existing value is foo
Closed, ResolvedPublic

Description

When searching for "fooo" with the following query, the api reports an error.

https://en.m.wikipedia.org/w/api.php?action=query&format=jsonfm&generator=search&gsrinfo=totalhits%7Csuggestion&gsrlimit=24&gsrnamespace=0&gsroffset=0&gsrprop=redirecttitle&gsrsearch=fooo&gsrwhat=text&list=search&pilimit=24&piprop=thumbnail&pithumbsize=144&ppprop=wikibase_item&prop=pageprops%7Cpageimages&srinfo=suggestion&srlimit=24&srnamespace=0&sroffset=0&srprop=&srsearch=foood&srwhat=text

The error:
Exception Caught: Internal error in ApiResult::setElement: Attempting to add element suggestion=foo, existing value is foo

Context for the query parameters above: apps would like to have option for in-article search. The parameters above are intended to, in a single query, return the results and thumbnail urls and wikibase id's and list results in proper order.


Version: unspecified
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=37552

Details

Reference
bz73321

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:52 AM
bzimport added a project: MediaWiki-API.
bzimport set Reference to bz73321.
bzimport added a subscriber: Unknown Object (MLST).
Mhurd created this task.Nov 12 2014, 7:08 PM

gerritadmin wrote:

Change 172794 had a related patch set uploaded by Anomie:
API: Don't add searchinfo or interwiki info from generator=search

https://gerrit.wikimedia.org/r/172794

As a workaround, pass an empty value for 'gsrinfo'.

gerritadmin wrote:

Change 172794 merged by jenkins-bot:
API: Don't add searchinfo or interwiki info from generator=search

https://gerrit.wikimedia.org/r/172794

The fix should be deployed to WMF wikis with 1.25wmf9, see https://www.mediawiki.org/wiki/MediaWiki_1.25/Roadmap for the schedule.