Page MenuHomeMiraheze

Incorrect calcuations in categories and statistics
Closed, ResolvedPublic


At the Critical Role wiki, there seems to be an error in calculating what current exists on the wiki after a significant number of pages and text File pages (lacking associated images) were deleted earlier as part of housekeeping after a large import. Special:Statistics is currently listing about 5,500 content pages (I understand this to be mainspace pages that are not redirects) when there's closer to 3,000. Categories are showing the incorrect number of items, most visible at Category:Images; there's currently only 4 files on the wiki, and none of them are in that category or any of its sub-categories. The file pages still being counted as existing is apparently forcing significant number of categories to exist even though the category itself appears empty, see this Special:Categories query. The large number of sub-categories listed under Category:Fan art, see in the Images category, also suggests that the wiki is still tabulating a significant number of deleted and non-existent categories.

I've waited about a day or so, hoping it will resolve itself, and I've also checked the API to make sure that there weren't any jobs in the queue. The API currently lists the incorrect number of pages, but the correct number of images.

Event Timeline

Universal_Omega raised the priority of this task from Low to Normal.Wed, May 4, 21:53

Why did you reopen the task? I did run the script, and confirmed content pages count was now correct.

Interestingly, the content pages issue part has been resolved, and the correct (as far as I know) number of articles is being shown in Special:Statistics, but the category counts are still wildly incorrect. An example at Category:Images still shows categories that should be wholly empty as having up to hundreds of files or subcategories that do not exist, and Special:WantedCategories and a Special:Categories query shows a significant number of categories populated with files that don't exist (Special:Categories starting at "Art by"). For some reason, the wiki is still tabulating file pages and categories that used to contain file pages as still existing, even after the Statistics page was properly brought to speed.

Recreating one of the categories, then deleting it again does remove it from Special:Categories, but doesn't seem to otherwise affect the pages in category namespace.

Oh, I apologise for that. I completely missed that part of the task.

Categories count should now be fixed.

They're doing this REALLY weird thing now where they're showing a negative value of pages equal to the number of non-existent files or non-existent categories. Most of the non-existent sub-categories that are being count indeed are no longer showing up in Special:Categories and Special:WantedCategories (yay!), but some of them are still appearing and the categories that used to contain them are still tabulating them.

You can still see these problems in the attached screenshot of Category:Images. (All files in the attached screenshot do not exist.) For example, "Category:Episode thumbnails" in the screenshot is tabulating 430 files that do not exist, so the category count is trying to resolve it by subtracting 430 pages from 0, and is turning up "-430 pages, 430 files".

image.png (670×764 px, 87 KB)

I managed to clear most of these by temporarily moving a file and a page into, then back out of the categories, but the remainder of them are very stubborn. I waited a few days to see if it would turn over itself, but it still hasn't.

I apologise again. I think I did get it right now.