Page MenuHomePhabricator

negative number of pages in a category?
Closed, ResolvedPublicBUG REPORT

Description

see https://commons.wikimedia.org/wiki/Category:Files_with_coordinates_missing_SDC_location_of_creation

there are some subcategories listed with a negative number of pages: e.g.
Files with coordinates missing SDC location of creation (49° N, 11° E)‎ (-287 S, 60932 D)
Files with coordinates missing SDC location of creation (48° N, 7° E)‎ (-11 S, 81645 D)
(might be transient and I'm not eager enough to make a screenshot)

afaik, there is no such thing as negative number of pages.

and even with positive number of pages,
Files with coordinates missing SDC location of creation (51° N, 1° W)‎ (4 S, 137090 D)
the subcat does not show any pages.

@Multichill , can you please assign a proper tag

Event Timeline

Bugreporter subscribed.

maybe a bug in recountCategories.php, which runs once every month (at 1st day 4:00).

Some excessive linkpurge/nulledit also happen to fill the categories due to T373722
The next run of recountCategories.php should fix it.

Some excessive linkpurge/nulledit also happen to fill the categories due to T373722
The next run of recountCategories.php should fix it.

it is about the number of subpages, not the number of files in those categories. Subpages are not affected by excessive linkpurge of files, I assume.
We can wait till the # of subpages are re-generated. In the worst case we loose the test case. In any case negative results (negative # of subpages, also files) should be asserted and considered a wrong state.

The count in the database has three parts: "all members", "file members" and "sub-category members".
The page count is not tracked as own field, but calcuated by the others.

maybe a bug in recountCategories.php, which runs once every month (at 1st day 4:00).

another month is gone, problem persists (although with arbitrary subcats of https://commons.wikimedia.org/wiki/Category:Files_with_coordinates_missing_SDC_location_of_creation)

Change #1083887 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] Category: Refresh counts for negative page count

https://gerrit.wikimedia.org/r/1083887

Change #1083887 merged by jenkins-bot:

[mediawiki/core@master] Category: Refresh counts for negative page count

https://gerrit.wikimedia.org/r/1083887

Umherirrender claimed this task.
Umherirrender removed a project: Patch-For-Review.

Change #1085505 had a related patch set uploaded (by PleaseStand; author: PleaseStand):

[mediawiki/core@master] Category: Fix mistake when adjusting negative page counts

https://gerrit.wikimedia.org/r/1085505

Change #1085505 merged by jenkins-bot:

[mediawiki/core@master] Category: Fix mistake when adjusting negative page counts

https://gerrit.wikimedia.org/r/1085505

  NODES
Note 3
Project 7