Page MenuHomePhabricator

Always return core-defined tags when requesting all tags in the tag filter selector
Closed, ResolvedPublic

Description

https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1085428 added a set of parameters that could declare different tag collections to be used when generating the tag filter selector in order to support Special:GlobalContribution's use case (all core-defined tags). These parameters define what functions are used to generate and filter tag sets for the markup. When set to USE_SOFTWARE_TAGS_ONLY, the useAllTags parameter uses the ChangeTagsStore->getSoftwareTags to get its tags, which can be affected by the use of $wgSoftwareTags. For instance:

  • Wiki A sets $wgSoftwareTags = [ 'mw-blank' ];
  • Wiki B sets $wgSoftwareTags = [ 'mw-replace' ];
  • An edit on Wiki B uses the mw-replace tag
  • When looking up all possible tags to filter with on Wiki A, the set of possible tags will be [ 'mw-blank' ] and the mw-replace cannot be filtered on, even though it's a core-defined tag.

To resolve this, instead of relying on the existing functions, let's add a new function that exposes the ChangeTagsStore::DEFINED_SOFTWARE_TAGS variable without filtering on it and use that instead. The meaning of useAllTags will change but otherwise everything else should continue to just work.

Event Timeline

Change #1098639 had a related patch set uploaded (by STran; author: STran):

[mediawiki/core@master] Explicitly return codebase-defined software tags in tag filter selector when requested

https://gerrit.wikimedia.org/r/1098639

Change #1098639 merged by jenkins-bot:

[mediawiki/core@master] Explicitly return codebase-defined software tags in tag filter selector when requested

https://gerrit.wikimedia.org/r/1098639

dom_walden subscribed.

I have looked at the tags available on Special:GlobalContributions on a couple of different wikis. They all seem to correspond to those listed in ChangeTagsStore::DEFINED_SOFTWARE_TAGS.