Page MenuHomePhabricator

Counter for pages in category is below zero
Closed, ResolvedPublic

Description

On page https://cs.wikipedia.org/wiki/Kategorie:%C3%9Adr%C5%BEba:Str%C3%A1nky_k_p%C5%99ejmenov%C3%A1n%C3%AD the counter next to "Údržba:Kategorie k přejmenování‎" says "4 cats, -1 pages"

Event Timeline

I see, could some similar recalculation be done on cswiki then?

@TTO : are you still working on it?

T238500: I tested several eventualities, and could find out: database table 'categories', column 'cat_subcats' starts by -1. If there are 2 subcategory pages, then 'cat_subcats' returns 1. Please keep an eye on T238500 though it is marked as 'closed'. Thanks!

Mentioned in SAL (#wikimedia-operations) [2019-11-18T12:51:15Z] <Urbanecm> Run mwscript recountCategories.php --wiki=cswiki --mode={subcats,pages,files} (T228585)

Urbanecm claimed this task.

Recounted.

[urbanecm@mwmaint1002 ~]$ mwscript recountCategories.php --wiki=cswiki --mode=subcats
Finding up to 500 drifted rows starting at cat_id 500...
Updating cat_subcats field on 68 rows...
Finding up to 500 drifted rows starting at cat_id 500...
Done! Updated the subcats counts of 68 categories.
Now run the script using the other --mode options if you haven't already.
[urbanecm@mwmaint1002 ~]$ mwscript recountCategories.php --wiki=cswiki --mode=pages
Finding up to 500 drifted rows starting at cat_id 500...
Updating cat_pages field on 443 rows...
Finding up to 500 drifted rows starting at cat_id 500...
Done! Updated the pages counts of 443 categories.
Now run the script using the other --mode options if you haven't already.
Also run 'php cleanupEmptyCategories.php --mode remove' to remove empty,
nonexistent categories from the category table.

[urbanecm@mwmaint1002 ~]$ mwscript recountCategories.php --wiki=cswiki --mode=files
Finding up to 500 drifted rows starting at cat_id 500...
Done! Updated the files counts of 0 categories.
Now run the script using the other --mode options if you haven't already.
[urbanecm@mwmaint1002 ~]$

@Urbanecm: Please see T238500, recount again please. Maybe it makes sense to run a daily script for automatical recount.

No issue was found with cswiki.

Maybe it makes sense to run a daily script for automatical recount.

Different topic for a separate discussion, plus that proposal will likely not perform. :)