Last modified: 2009-10-22 06:29:25 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 3834 - Number of articles in subcategories shown on category page
Number of articles in subcategories shown on category page
Product: MediaWiki
Classification: Unclassified
Categories (Other open bugs)
All All
: Normal enhancement with 3 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
Blocks: 13326
  Show dependency treegraph
Reported: 2005-10-30 15:54 UTC by PS
Modified: 2009-10-22 06:29 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Description PS 2005-10-30 15:54:57 UTC
When one looks at a category, say "category:X" usually it lists a variety 
of sub-categories, and also a variety of assorted articles which belong to 
category X.

Would it be possible next to each subcategory to give a count of the 
number of unique pages within that sub-category?

The idea would be, to see at a glance which sub-categories had many 

I understand that there is a risk of circularity in the counting, I don't 
know if that makes it technically impossible. Thoughts?
Comment 1 Brion Vibber 2005-10-31 00:25:57 UTC
This would probably be unnecessarily expensive.
Comment 2 Wing-Chi Poon 2006-04-20 21:13:49 UTC
What about just one level down? i.e. listing the number of immediate
sub-categories and the number of immediate pages that below to this category.
This prevents circularity, and also the running cost could be amortized as follows:

Each category keeps the two counts as part of its database entry.
When a page/category list this category as its immediate parent, the
corresponding count is incremented.
When a page/category delist this category as its immediate parent, the
corresponding count is decremented.
When this category is listed as a subcategory of its parent, the two counts are
furnished for display.

All the above operations take constant time.
Comment 3 Dallas Warren 2007-04-19 22:42:02 UTC
I would also like to express my support for such a feature.  Just brackets after
the sub category name, which contains the number of objects within that
category, wich I suppose should hold both pages and further subcategories.
Comment 4 FT2 2008-03-12 01:28:26 UTC
append (X/Y) 

where X = direct member articles and Y = direct member subcategories?
Comment 5 prodigion 2008-04-08 16:11:27 UTC
This bug seems to be much easier now that bug 6943 has been fixed.
Comment 6 Thomas Bleher 2009-10-22 06:29:25 UTC
If I understand this bug report correctly, this already works on Wikipedia (probably through the CategoryTree extension). If not, please reopen the bug with a description what is still missing.

Note You need to log in before you can comment on or make changes to this bug.