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

Dvorapa created this task.Jul 21 2019, 12:17 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 21 2019, 12:17 PM

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

doctaxon added a subscriber: TTO.Sun, Nov 17, 9:55 PM

@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 closed this task as Resolved.Mon, Nov 18, 12:52 PM
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 ~]$
Restricted Application added a project: User-Urbanecm. · View Herald TranscriptMon, Nov 18, 12:52 PM
doctaxon reopened this task as Open.Tue, Nov 19, 8:02 AM

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

Urbanecm closed this task as Resolved.Tue, Nov 19, 8:52 AM

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