Page MenuHomePhabricator

Internal error in ApiResult::setElement when using a query module both as list and generator
Closed, ResolvedPublic

Description

Author: a.d.bergi

Description:
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?


Version: 1.20.x
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=73321

Details

Reference
bz37552

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:20 AM
bzimport set Reference to bz37552.
bzimport added a subscriber: Unknown Object (MLST).

Fixed by gerrit 172794 (bug 73321)