Last modified: 2014-11-12 19:36:29 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 T39552, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 37552 - Internal error in ApiResult::setElement when using a query module both as list and generator
Internal error in ApiResult::setElement when using a query module both as lis...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
1.20.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-13 15:41 UTC by Bergi
Modified: 2014-11-12 19:36 UTC (History)
6 users (show)

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


Attachments

Description Bergi 2012-06-13 15:41:19 UTC
On action=query&generator=search&gsrsearch=Einleitung&list=search&srsearch=Einleitung I get an "internal_api_error_MWException": Internal error in ApiResult::setElement: Attempting to add element totalhits=9419, existing value is 9419".

This is ridicolous, I think the method should not throw an error when one requests to set a property to the already existing, quite same value. Nothing against a warning, but an exception imho is a bit too much. The result would not be wrong, and would be handled correctly by the requester.

But this is also a structural problem. By searching for two different expressions, the numbers easily would differ. Should we disallow generator modules to set any output values, making their only purpose to return a list of pages/revisions? Or give them a special output section?
Comment 1 Umherirrender 2014-11-12 19:36:29 UTC
Fixed by Gerrit change #172794 (bug 73321)

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


Navigation
Links