Last modified: 2010-05-15 15:28:17 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 934 - Suppress duplicate categories on articles
Suppress duplicate categories on articles
Product: MediaWiki
Classification: Unclassified
Categories (Other open bugs)
All All
: Normal enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch
: 53 (view as bug list)
Depends on:
  Show dependency treegraph
Reported: 2004-11-23 15:54 UTC by Zigger
Modified: 2010-05-15 15:28 UTC (History)
2 users (show)

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

Changes mCategoryLinks in ParserOutput to hash table (573 bytes, patch)
2004-11-25 18:40 UTC, Dan Keshet (English Wikipedia)

Description Zigger 2004-11-23 15:54:54 UTC
If an article contains multiple templates with the same category, that category
is currently displayed multiple times.
Comment 1 Dan Keshet (English Wikipedia) 2004-11-25 18:40:08 UTC
Created attachment 134 [details]
Changes mCategoryLinks in ParserOutput to hash table

This patch changes the array mCategoryLinks from being numerically-indexed with
category titles as values to being title-indexed with meaningless values,
therefore not reproducing categories multiple times.  function merge in
ParserOutput might need to be changed (it accesses mCategoryLinks directly),
but I can't figure out what it does or where it's supposed to be used, so I'm
not touching it.  Tested on HEAD.  Note that mCategoryLinks in LinkCache
already works correctly, it's only the output that's wrong.
Comment 2 Brion Vibber 2004-11-25 22:19:17 UTC
Committed for 1.4. I've also added a version stamp for the 
ParserOutput objects, since these are retained in serialized form in 
the parser cache and we need to be able to invalidate old data when 
the format changes in an incompatible way.

Dan, a nice trick: if you do 'cvs diff -u' it will produce more legible 
diffs, which are also easier to reintegrate when the surrounding 
code changes.
Comment 3 Zigger 2004-11-26 00:22:35 UTC
*** Bug 53 has been marked as a duplicate of this bug. ***
Comment 4 River Tarnell 2004-11-26 00:24:30 UTC
I don't like this change - if double categories aren't shown on a page when it's
done in error, they won't be fixed.  One solution might be to show double
categories if a single 'object' (page, template, ...) includes the category
multiple times.
Comment 5 Brion Vibber 2004-11-26 00:49:02 UTC
As it is only one link can make it into the link tables; this change makes the UI 
behavior match the data as stored in the database.
Comment 6 Brion Vibber 2005-03-10 03:31:16 UTC
This was fixed in 1.4; resolving FIXED.

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