Page MenuHomePhabricator

moodbarcomments via api results in Exception Caught: Internal error in ApiResult::setElement: Attempting to add element *=, existing value is dtuieti
Closed, ResolvedPublic

Description

When trying to retrieve the latest 5 moodbar comments via the api, the following error occurs (http://nl.wikipedia.org/w/api.php?action=query&list=moodbarcomments&mbcdir=older&mbclimit=5&format=jsonfm)

{
"servedby": "srv215",
"error": {

		"code": "internal_api_error_MWException",
		"info": "Exception Caught: Internal error in ApiResult::setElement: Attempting to add element *=, existing value is dtuieti",
		"*": ""

}
}


Version: master
Severity: normal

Details

Reference
bz41818

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 12:44 AM
bzimport set Reference to bz41818.

If one requests the last 5 comments, this bug will happen if one of those 5 comments is hidden by a user.

The problem is that extractRowInfo in ApiQueryMoodBarComments.php calls ApiResult::setContent twice on the same array when the content is hidden. The easiest fix would be to store and manipulate the content in a local var, and then call ApiResult::setContent just once at the end.

So... we found out what the bug is and how it should be fixed. When will this be fixed? Is this another bug that is reported by me, then ignored because no-one can give a fuck?

You could've patched and uploaded it yourself, you know.

Gerrit change 37643. Please test it.

I don't have an account there and I don't have any idea how git works, how the reviewing works or even how I make the code you changed visible. Life would be easy if everyone solved the bugs they found right away (no need to have bugzilla, right?).

I would like to solve bugs, but I have not enough knowledge of the internals of MediaWiki and patches would most likely break more than they would fix. That said, I want to thank you for submitting the patch. I have no idea how I should test it, but at least at some point it will probably fix the problem so that I can use my script on Wikipedia again.

ignored because no-one can give a fuck?

Everybody is busy and doing their best, as I assume it's your case as well. Thank you for reporting the bug, thank for the ones that fixed it and merge it. Next time please save the language and assumptions nobody deserves. This is a collaborative place where we try to help each other. No need to reply, let's leave it here. :)