Last modified: 2014-02-26 11:40:26 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 T32227, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 30227 - API returns the wrong values for 'total' and 'count' of ratings
API returns the wrong values for 'total' and 'count' of ratings
Status: RESOLVED WONTFIX
Product: MediaWiki extensions
Classification: Unclassified
ArticleFeedback (Other open bugs)
unspecified
All All
: Normal major (vote)
: ---
Assigned To: Nobody - You can work on this!
http://en.wikipedia.org/w/api.php?_=1...
wikimedia[unmaintained]
:
: 30021 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-04 16:57 UTC by Helder
Modified: 2014-02-26 11:40 UTC (History)
7 users (show)

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


Attachments

Description Helder 2011-08-04 16:57:02 UTC
As reported on [[mw:Thread:Talk:Article feedback/I think I have encountered a bug?]], the averages for the article [[Remember December]] are wrong.

The data returned from API in the query given in the url above includes the following values:

-------------------------
"pageid": "28172104",
"revid": 442275047,
"ratings": [
  {
    "ratingid": 1,
    "ratingdesc": "articlefeedback-field-trustworthy-label",
    "total": 4294967316,
    "count": 4294967300,
    "countall": 6
  },
  {
    "ratingid": 2,
    "ratingdesc": "articlefeedback-field-objective-label",
    "total": 4294967317,
    "count": 4294967300,
    "countall": 6
  },
  {
    "ratingid": 3,
    "ratingdesc": "articlefeedback-field-complete-label",
    "total": 4294967318,
    "count": 4294967300,
    "countall": 6
  },
  {
    "ratingid": 4,
    "ratingdesc": "articlefeedback-field-wellwritten-label",
    "total": 4294967319,
    "count": 4294967300,
    "countall": 6
  }
],
-------------------------

The numbers for each 'total' and 'count' seems to be wrong.
Comment 1 Helder 2011-08-04 16:59:56 UTC
(In reply to comment #0)
> As reported on [[mw:Thread:Talk:Article feedback/I think I have encountered a
> bug?]]
The link above didn't work (is there a bug on bugzilla about this?), so I hope this will works:

https://secure.wikimedia.org/wikipedia/mediawiki/wiki/Thread:Talk:Article_feedback/I_think_I_have_encountered_a_bug%3F
Comment 2 Roan Kattouw 2011-08-10 15:25:48 UTC
It looks to me like the total and count fields are trying to be negative (which shouldn't happen in the first place), and are wrapping around because they're unsigned fields in the database.
Comment 3 Mark A. Hershberger 2011-08-12 20:20:16 UTC
possibly related: Bug #30021
Comment 4 Roan Kattouw 2011-08-13 10:51:17 UTC
I've fixed all instances of wrapped-around (values above 4 billion) values in the article_feedback_revisions table; 162 revisions were affected. I also think I've found and fixed the race condition that caused these values to appear in the first place in r94404, but we won't really know whether that worked until I deploy that revision on Monday.

Marking as FIXED, at least for now, because the bug as described doesn't occur any more.
Comment 5 Roan Kattouw 2011-08-13 10:51:45 UTC
*** Bug 30021 has been marked as a duplicate of this bug. ***
Comment 6 adjwilley 2011-09-01 20:03:38 UTC
There is a similar bug that is visible on http://en.wikipedia.org/wiki/Mormons
Comment 7 Helder 2011-09-02 17:19:51 UTC
(In reply to comment #6)
> There is a similar bug that is visible on http://en.wikipedia.org/wiki/Mormons

Indeed, it displays
* Trustworthy: 130150527.4
* Objective: 113025458.3
* Complete: 119304650.5
* Well-written: 3.8

Is the fix deployed yet?

For the record,
http://en.wikipedia.org/w/api.php?action=query&format=jsonfm&list=articlefeedback&afpageid=18925&afanontoken=&afuserrating=0&maxage=0&smaxage=2592000
returns the following data for that page right now:
------------------------------------
{
"query": {
"articlefeedback": [
{
"pageid": "18925",
"revid": 447998960,
"ratings": [
{
"ratingid": 1,
"ratingdesc": "articlefeedback-field-trustworthy-label",
"total": 4294967404,
"count": 33,
"countall": 55
},
{
"ratingid": 2,
"ratingdesc": "articlefeedback-field-objective-label",
"total": 4294967414,
"count": 38,
"countall": 60
},
{
"ratingid": 3,
"ratingdesc": "articlefeedback-field-complete-label",
"total": 4294967418,
"count": 36,
"countall": 59
},
{
"ratingid": 4,
"ratingdesc": "articlefeedback-field-wellwritten-label",
"total": 130,
"count": 34,
"countall": 59
}
],
"status": "current"
}
]
}
}
------------------------------------
Comment 8 Mark A. Hershberger 2011-09-27 17:30:51 UTC
Current average ratings.
  Trustworthy: 3.6 (92 ratings)
  Objective: 3.0 (95 ratings)
  Complete:2.9 (92 ratings)
  Well-written: 3.3 (92 ratings)

Above API link gives:
{
	"query": {
		"articlefeedback": [
			{
				"pageid": "18925",
				"revid": 452239879,
				"ratings": [
					{
						"ratingid": 1,
						"ratingdesc": "articlefeedback-field-trustworthy-label",
						"total": 25,
						"count": 7,
						"countall": 92
					},
					{
						"ratingid": 2,
						"ratingdesc": "articlefeedback-field-objective-label",
						"total": 18,
						"count": 6,
						"countall": 95
					},
					{
						"ratingid": 3,
						"ratingdesc": "articlefeedback-field-complete-label",
						"total": 20,
						"count": 7,
						"countall": 92
					},
					{
						"ratingid": 4,
						"ratingdesc": "articlefeedback-field-wellwritten-label",
						"total": 23,
						"count": 7,
						"countall": 92
					}
				],
				"status": "current"
			}
		]
	}
}
Comment 9 Helder 2011-09-29 12:26:28 UTC
Copying the bug report from[0]:
----
I noticed in [[Scott Tucker (racing driver)]] that the Objective rating for the article is currently pegged at 715827884.3 after 9 votes. How did someone get a vote in the millions in?
----

The API[2] currently returns the following on that page
{
"query": {
"articlefeedback": [
{
"pageid": "25986151",
"revid": 452916497,
"ratings": [
	{
		"ratingid": 1,
		"ratingdesc": "articlefeedback-field-trustworthy-label",
		"total": 12,
		"count": 5,
		"countall": 9
	},
	{
		"ratingid": 2,
		"ratingdesc": "articlefeedback-field-objective-label",
		"total": 4294967306,
		"count": 6,
		"countall": 9
	},
	{
		"ratingid": 3,
		"ratingdesc": "articlefeedback-field-complete-label",
		"total": 7,
		"count": 6,
		"countall": 9
	},
	{
		"ratingid": 4,
		"ratingdesc": "articlefeedback-field-wellwritten-label",
		"total": 9,
		"count": 5,
		"countall": 8
	}
],
"status": "current"
}
]
}
}


[1] https://secure.wikimedia.org/wikipedia/mediawiki/wiki/Thread:Talk:Article_feedback/Bug%3F
[2] http://en.wikipedia.org/w/api.php?action=query&format=jsonfm&list=articlefeedback&afpageid=25986151&afanontoken=&afuserrating=0&maxage=0&smaxage=2592000
Comment 10 Roan Kattouw 2011-09-30 10:34:45 UTC
(In reply to comment #9)
> Copying the bug report from[0]:
> ----
> I noticed in [[Scott Tucker (racing driver)]] that the Objective rating for the
> article is currently pegged at 715827884.3 after 9 votes. How did someone get a
> vote in the millions in?
Yeah, this is almost fixed, hopefully, but not quite. I deployed something that I think will help fix it, but I haven't cleaned up all the old corrupted rows yet.
Comment 11 Ryan Kaldari 2012-06-18 18:38:08 UTC
Any update on the corrupted rows being fixed?
Comment 12 Ryan Kaldari 2012-10-19 22:08:43 UTC
Roan: How did you clean up the corrupted rows? Did you recalculate the totals or just drop all the bogus rows? If you just dropped them, should be easy enough for someone to finish the job.
Comment 13 Andre Klapper 2014-02-26 11:40:26 UTC
The extension homepage at [[mw:Extension:ArticleFeedback]] says 
"This extension has been archived. This extension has not been maintained in some time, and no longer supports recent releases of MediaWiki.
The following other choices are still available: [[mw:Extension:ArticleFeedbackv5]]"

Furthermore, ArticleFeedback (version 4 or earlier) was removed from all Wikimedia wikis in https://gerrit.wikimedia.org/r/#/c/98074/

It is currently unlikely that there will be any further active development of ArticleFeedback (version 4 or earlier).
Closing this report as WONTFIX to reflect reality.
Please feel free to reopen this report in the future if anyone takes the responsibility for active development of ArticleFeedback (version 4 or earlier) again.

Thank you for reporting this bug and we are sorry it could not be fixed.

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


Navigation
Links