Page MenuHomePhabricator

Wrong subcategory counts in Commons
Open, Needs TriagePublic


This is probably explained best with an example. In the Commons category, the first subcategory "17th-century portrait paintings of men, artist, location and year missing‎" is displayed as containing 2 subcategories, with an activated arrow button for the subcategory drop-down list. But this subcategory doesn't actually contain any subcategories.

There are various similar examples other categories, such as, e.g., 1 Chome Higashikaiganminami in Chigasaki from panoramio‎

This problem doesn't seem to occur in Wikipedia.

Related Objects


Event Timeline

Ghouston created this task.Mar 8 2020, 6:40 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 8 2020, 6:40 AM
Reedy added a subscriber: Reedy.Mar 8 2020, 11:41 PM

I've fixed those two specific cases by running populateCategories.php...

AFAIK, drift is known to occur, or has in the past. This may be fixed now though

I don't know if we need to schedule a one off run (for all wikis) to update each count, or if we need to be doing it as a more frequent maintenance script run

Thanks. There are plenty of other examples in Commons, such as other subcategories in and many in It seems to effect only categories that have names starting with numbers, but not every such category.

DMacks added a subscriber: DMacks.Tue, Jun 2, 3:17 AM

I just noticed this for that has no subcats but is listed as having "3C" at and other parent cats of it. That's another "starting with a number" cat, part of the pattern Ghouston mentioned.

@Peachey88, is there a reason you removed MediaWiki-Categories from this category-related task?

This needs no code changes in category code in MediaWiki core. Hence it should not be tagged as MediaWiki-Categories.