Requests for comment/Tagging within MediaWiki

Request for comment (RFC)
Tagging within MediaWiki
Component General
Creation date (2015-01-04)
Author(s) MZMcBride
Document status in draft

This is a request for comments regarding tagging within MediaWiki.


In 2009, change (revision) tags were introduced to MediaWiki. Adding revision tags was relatively easy, but it was unclear how we would eventually deal with the harder parts of creating a tagging system, namely curating tags, removing tags, renaming tags, etc.

In particular, it has never been possible for users to add and manage tags using MediaWiki core, despite tags being a core feature. All management of tags is currently done by extensions (possibly indirectly by users, as in the case of AbuseFilter, or possibly hard-coded, as in MobileFrontend).

TTO has proposed Gerrit change 181958 and Gerrit change 182563 to address bug T20670.


Broadly, I'd like to ensure that we're building a tagging infrastructure that can cover our current needs and use-cases, but that can also grow to cover future needs and use-cases. Right now, we're creating a tagging system that seems fairly specific to attaching immutable text strings (tags) to specific revisions (entries in the revision table). We typically call this "tags" in the interface, such as Special:Tags.

I'm concerned that this naming and architecture may be too generically labeled compared to the actual functionality. We'll likely want to add tagging support to watchlist entries at some point (cf. Support for user-specific page lists in core (talk)) and to individual pages (entries in the page table).

Being able to tag entries in the page table leads to being able to tag media files, which quickly brings up Wikidata. Wikidata will likely never cover revision, page, or watchlist tagging, so regardless of whether Wikidata covers tagging for media files, discussing tagging in MediaWiki seems sensible.

Growing the tagging system within MediaWiki core also requires thinking about what kind of interface users will use to add or remove or modify tags on an item (watchlist entry, revision/edit, page/article).

Each tagging update (add, remove, edit) will likely need a corresponding entry in the logging table to prevent abuse and to provide an audit trail.

And we need to figure out how tagging intersects with page properties, if at all.