(intermittent) {{PAGESINCATEGORY}} sometimes returns a negative number
Closed, ResolvedPublic

Assigned To
None
Priority
Normal
Author
MER-C
Subscribers
MER-C, wikibugs-l
Projects
Reference
bz13683
Description

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

Actual:

-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.


Version: 1.13.x
Severity: normal

Attached:

bzimport added a project: MediaWiki-Parser.Via ConduitNov 21 2014, 10:02 PM
bzimport added a subscriber: wikibugs-l.
bzimport set Reference to bz13683.
MER-C created this task.Via LegacyApr 10 2008, 1:06 PM
bzimport added a comment.Via ConduitApr 10 2008, 1:11 PM

ayg wrote:

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.

MER-C added a comment.Via ConduitApr 10 2008, 1:18 PM

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.

bzimport added a comment.Via ConduitMay 15 2008, 5:06 PM

ayg wrote:

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.

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.