Page MenuHomePhabricator

Wrong file count for category
Closed, DuplicatePublic

Description

The count of files for category "Copyright violations" on Commons (https://commons.wikimedia.org/wiki/Category:Copyright_violations) seems to be wrong when viewed from other pages. The number always seems to include 11 extra "ghost files".

For example, currently the "Copyright violations" category contains 1 file, but on page https://commons.wikimedia.org/wiki/Category:Candidates_for_speedy_deletion "12 F" is shown.

Same on https://commons.wikimedia.org/wiki/Commons:Administrators%27_noticeboard/Backlog, which uses the {{PAGESINCATEGORY:Copyright violations|files}} magic word, rendering 12 instead of 1.

Purging either page or category or doing a null edit has no effect. This problem exists for at least a few days now.

Event Timeline

Note that on the backlog there is now a workaround (manually subtract 11), which is why the number appears correct.

Krinkle added a subscriber: Krinkle.

I can reproduce this. https://commons.wikimedia.org/wiki/Category:Copyright_violations states "5 files in the category" (with a gallery showing 5 thumbnails), but the parent category states "Copyright violations‎ (16 F)".

Seems like this can be one of two things:

  1. Maybe the secondary data in the database (categorylinks table, and categories table) is wrong and somehow consistently off by +11.
  2. Maybe the secondary data is right, but the actual category page is refusing to show the 11 "ghost" files.

Unable to tag a team per mw:Maintainers, but CC-ing @Bawolff who's expressed an interest on that page.