Last modified: 2011-04-14 15:13:45 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 9314 - Depopulate categories when deleting them
Depopulate categories when deleting them
Status: NEW
Product: MediaWiki
Classification: Unclassified
Categories (Other open bugs)
All All
: Low enhancement with 2 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
  Show dependency treegraph
Reported: 2007-03-16 16:07 UTC by Tsee
Modified: 2011-04-14 15:13 UTC (History)
1 user (show)

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


Description Tsee 2007-03-16 16:07:50 UTC
Right now, bots need to be involved when deleting a Category, which needs to be
emptied first. Renaming a cat is equally awkward. Is it possible to modify the
software so that you can choose to delete a Category from all linked pages with
the click of a button, or rename one easily? Thanks
Comment 1 Rob Church 2007-03-16 16:15:28 UTC
Repurposing to cover just the deletion; renaming is bug 8685.
Comment 2 Aryeh Gregor (not reading bugmail, please e-mail directly) 2007-12-16 20:40:21 UTC
This can't be done cleanly as long as category membership is still stored in-band with the rest of the text, i.e., typing [[Category:Something]] to add to a category.  See bug 167.
Comment 3 Tsee 2007-12-17 00:11:40 UTC
Sorry, I don't understand. Why can't you you delete all relevant textstrings ("[[[[Category:Foo]]") from the affected pages easily?
Comment 4 Aryeh Gregor (not reading bugmail, please e-mail directly) 2007-12-17 01:12:33 UTC
You have to account for <nowiki>, <pre>, <noinclude>, <includeonly>, <onlyinclude>, extensions, templates, and various weird combinations thereof.  In particular, it can easily be impossible to algorithmically delete a template-generated category.  Consider [[Template:A]] containing "Text [[Category:{{{1}}}]]", and [[B]] containing "{{A|Foo}}", then try to delete "[[Category:Foo]]" from that page without deleting "Text".  (Of course, the latter would apply as long as templates can add categories, in-band or not.)

Yes, you could cobble something together for some cases, but as I said, it can't be done *cleanly*.  At the very least you would have to partially parse every affected page to make sure you avoided basic constructs like <nowiki>, and that would take a long time.  Not to mention it would be a huge pain to reverse.

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