Page MenuHomePhabricator

Add module to get the list of all TrackingCategories
Open, LowPublicFeature


A special page already give the informations about tracking categories, [[Special:TrackingCategories]].
The purpose of this bug/enhancement is to provide a way to get this list through the API.

In module action=query&meta=siteinfo, add a value for siprop parameter named trackingcategories.
The result will give for each tracking category both system message names for the category name and the category description.

Event Timeline

Dr_Brains raised the priority of this task from to Low.
Dr_Brains updated the task description. (Show Details)
Dr_Brains changed Security from none to None.
Dr_Brains added a subscriber: Dr_Brains.

I wonder whether a list module wouldn't be better for this, both because meta=siteinfo is already rather overgrown and because the list module could be made to be used as a generator.

To clarify, you want to retrieve:

  • The category name (Pages where template include size is exceeded) as plain text
  • The category description (The page size is bigger than <code>$wgMaxArticleSize</code> after expanding all the templates, so some templates were not expanded.) as plain text

Is that correct?

Tracking categories are defined by adding a message key name to $wgTrackingCategories. The minimal version would be to output the value of that in meta=siteinfo.

But chances are any client requesting these isn't going to care much about the message key name, they'll probably want to know the actual category titles on-wiki to look at. They may even want to use it as a generator. Use as a generator would call for a separate (list) module, which can return both the key and the category title.

The description's message key is derived from the category's key by appending "-desc", and list=allmessages already has the infrastructure to fetch that. In general we try to keep UI messages other than errors and warnings out of the rest of the API responses. So I'd recommend not including that part.

@Anomie so to double check, just retrieve the name of the categories (as plain text)?

Just the categories and keys, not their descriptions.

Aklapper added a subscriber: DannyS712.

Removing task assignee due to inactivity, as this open task has been assigned for more than two years. See the email sent to the task assignee on February 06th 2022 (and T295729).

Please assign this task to yourself again if you still realistically [plan to] work on this task - it would be welcome.

If this task has been resolved in the meantime, or should not be worked on ("declined"), please update its task status via "Add Action… 🡒 Change Status".

Also see for tips how to best manage your individual work in Phabricator.

Tacsipacsi changed the subtype of this task from "Task" to "Feature Request".Apr 10 2022, 3:22 PM
Tacsipacsi added a subscriber: Tacsipacsi.

A single tracking category can have multiple names, for example broken-file-category may be Articles with missing files, Templates with missing files or Pages with missing files‎ on enwiki (depending on the namespace). This means that the the result of this API module should contain an array, for example instead of something like

		"name": "broken-file-category",
		"category": "Pages with missing files‎",
		"The page contains a broken file link (a link to embed a file when the file does not exist)."

it should be along the lines

		"name": "broken-file-category",
		"category": ["Articles with missing files", "Templates with missing files", "Pages with missing files‎"],
		"The page contains a broken file link (a link to embed a file when the file does not exist)."