Page MenuHomeMiraheze

Incorrect calcuations in categories and statistics
Closed, ResolvedPublic

Description

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

Unknown Object (User) raised the priority of this task from Low to Normal.May 4 2022, 21:53
Unknown Object (User) added projects: MediaWiki, MediaWiki (SRE).
Unknown Object (User) moved this task from Backlog to Maintenance Script Run on the MediaWiki board.May 4 2022, 21:53
Unknown Object (User) moved this task from Backlog to Short Term on the MediaWiki (SRE) board.
Unknown Object (User) closed this task as Resolved.May 4 2022, 23:54
Unknown Object (User) claimed this task.
Unknown Object (User) added a comment.May 7 2022, 03:34

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.

Unknown Object (User) added a comment.May 7 2022, 04:35

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

Unknown Object (User) closed this task as Resolved.May 8 2022, 21:48

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.

Unknown Object (User) closed this task as Resolved.May 12 2022, 20:45

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