Page MenuHomePhabricator

Wrong subcategory counts in Commons
Open, Needs TriagePublic

Description

This is probably explained best with an example. In the Commons category https://commons.wikimedia.org/wiki/Category:17th-century_portrait_paintings_of_men_not_categorised_by_year, 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 https://commons.wikimedia.org/wiki/Category:Hidden_categories, e.g., 1 Chome Higashikaiganminami in Chigasaki from panoramio‎

This problem doesn't seem to occur in Wikipedia.

Related Objects

StatusSubtypeAssignedTask
OpenNone
StalledNone

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 https://commons.wikimedia.org/wiki/Category:Hidden_categories and many in https://commons.wikimedia.org/wiki/Category:Pages_with_local_coordinates_and_similar_Wikidata_coordinates. 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 https://commons.wikimedia.org/wiki/Category:4-Hydroxy-TEMPO that has no subcats but is listed as having "3C" at https://commons.wikimedia.org/wiki/Category:Aminoxyls 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.