Last modified: 2012-12-09 04:55:08 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 T43818, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 41818 - moodbarcomments via api results in Exception Caught: Internal error in ApiResult::setElement: Attempting to add element *=, existing value is dtuieti
moodbarcomments via api results in Exception Caught: Internal error in ApiRes...
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
MoodBar (Other open bugs)
master
All All
: Unprioritized normal (vote)
: ---
Assigned To: Alex Monk
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-06 12:32 UTC by Sumurai8 (NL)
Modified: 2012-12-09 04:55 UTC (History)
7 users (show)

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


Attachments

Description Sumurai8 (NL) 2012-11-06 12:32:54 UTC
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",
		"*": ""
	}
}
Comment 1 Sumurai8 (NL) 2012-11-29 10:04:23 UTC
If one requests the last 5 comments, this bug will happen if one of those 5 comments is hidden by a user.
Comment 2 Brad Jorsch 2012-11-29 14:18:11 UTC
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.
Comment 3 Sumurai8 (NL) 2012-12-08 20:49:07 UTC
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?
Comment 4 Alex Monk 2012-12-08 21:01:29 UTC
You could've patched and uploaded it yourself, you know.

Gerrit change #37643. Please test it.
Comment 5 Sumurai8 (NL) 2012-12-08 21:19:59 UTC
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.
Comment 6 Alex Monk 2012-12-08 23:11:01 UTC
Merged by Ori Livneh.
Comment 7 Quim Gil 2012-12-09 04:55:08 UTC
> 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.  :)

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


Navigation
Links