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

Reedy created this task.Jan 17 2018, 12:00 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 17 2018, 12:00 AM

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)

Anomie added a subscriber: Anomie.Jan 17 2018, 3:06 PM

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

Anomie claimed this task.Jan 17 2018, 3:08 PM
Anomie moved this task from Unsorted to Needs Review on the MediaWiki-API board.

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

Reedy added a comment.Jan 17 2018, 4:38 PM

Thanks! :)