Last modified: 2010-05-15 16:03:36 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 13683 - (intermittent) {{PAGESINCATEGORY}} sometimes returns a negative number
(intermittent) {{PAGESINCATEGORY}} sometimes returns a negative number
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
  Show dependency treegraph
Reported: 2008-04-10 13:06 UTC by MER-C
Modified: 2010-05-15 16:03 UTC (History)
1 user (show)

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

Instance of bug (137.99 KB, image/png)
2008-04-10 13:06 UTC, MER-C

Description MER-C 2008-04-10 13:06:31 UTC
Created attachment 4799 [details]
Instance of bug

For certain categories {{PAGESINCATEGORY}} returns a negative number. See the attachment (screenshot) for an instance of the bug. At that particular time, [[Category:Attack pages for speedy deletion]] was empty while [[Category:Wikipedia protected edit requests]] contained only [[Template talk:Cite conference]].

Wikitext to reproduce on en:

{{PAGESINCATEGORY:Attack pages for speedy deletion}} : {{PAGESINCATEGORY:Wikipedia protected edit requests}}

Expected (for above scenario):

0 : 1


-1 : -6

This may be indicative of a general inaccuracy in this magic word, but you definitely know there's something wrong when you're being told a category has negative members.
Comment 1 Aryeh Gregor (not reading bugmail, please e-mail directly) 2008-04-10 13:11:33 UTC
Summary tables never seem to be accurate, for some annoying reason.  (I have no idea why.  It should all be nicely wrapped in transactions, shouldn't it?)

It won't be noticeable for categories like [[Category:Living people]], since a few pages here or there is a drop in the bucket, but for categories that are expected to be near zero, the fluctuations up and down will inevitably be somewhat noticeable.  I don't know what the best solution is.  We could of course just pretend it means zero, but that just papers over the real problem, which is that the count isn't accurate.  Ugh.
Comment 2 MER-C 2008-04-10 13:18:39 UTC
A more blatant example: {{PAGESINCATEGORY:Wikipedia articles in need of updating}} == -18, which is not only negative but off by several orders of magnitude as well.
Comment 3 Aryeh Gregor (not reading bugmail, please e-mail directly) 2008-05-15 17:06:12 UTC
As of r34870, if the number of pages (or subcats or media files) is negative on initialization, we just do a recount.  This should be acceptably fast for occasional use, or frequent use on small categories.

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