Page MenuHomePhabricator

API query=tags always shows the name
Closed, ResolvedPublic


The tag name is listed as a property that can be turned on and off... But in the code, it really can't be

			'prop' => [
				ApiBase::PARAM_DFLT => 'name',
				ApiBase::PARAM_TYPE => [

And then

			$tag = [];
			$tag['name'] = $tagName;

			if ( $fld_displayname ) {
				$tag['displayname'] = ChangeTags::tagDescription( $tagName, $this );

Should we make it possible to not display it? Or just remove it from the properties?

Event Timeline

I think the fix here is to just remove it from the properties... As turning it off completely doesn't make much sense, as you lose any way of referencing it (as there's no id either)

Removing the prop seems like the correct action to me too. In December 2017 on WMF wikis, there were 4265 hits to the module. 60 didn't specify any tgprop and 240 explicitly include 'name'; the other 3965 would be broken if we made the prop actually function as it should.

We'll have to announce this to mediawiki-api-announce, since it will result in a warning being returned to clients.

Change 404684 had a related patch set uploaded (by Anomie; owner: Anomie):
[mediawiki/core@master] ApiQueryTags: Remove unused tgprop value

Change 404684 merged by jenkins-bot:
[mediawiki/core@master] ApiQueryTags: Remove unused tgprop value