Page MenuHomePhabricator

counter property still reported by the API when $wgDisableCounters enabled
Closed, ResolvedPublic

Description

Author: zak

Description:
When $wgDisablePageCounters is enabled, API queries may still return the counter property. In cases where the counter property is returned, it's set to 0.

A better behavior would be to throw a warning for any query that would explicitly or implicitly return counter when $wgDisablePageCounters is enabled.


Version: unspecified
Severity: trivial
URL: http://www.mediawiki.org/w/api.php?action=query&titles=Main_page&prop=info

Details

Reference
bz25760
TitleReferenceAuthorSource BranchDest Branch
fab: build images with user dockerpkg-builderrepos/releng/dev-images!39hasharfab-shared-usermain
Customize query in GitLab

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:22 PM
bzimport set Reference to bz25760.

(In reply to comment #1)

Just for the record, it's set to 3 here:
http://en.wikipedia.org/w/api.php?action=query&titles=Einstein&format=txtfm&prop=info

Yes. That predates the feature being disabled. It will return whatever the stored value is. The issue is that it shouldn't return the property at all if the feature has been disabled.

I don't think the warning is really necessary... It's just returned as part of the information..

It's whether we want to just return like "" if the counter is disabled, or nothing at all

Relatively trivial to fix

(In reply to comment #3)

I don't think the warning is really necessary... It's just returned as part of
the information..

It's whether we want to just return like "" if the counter is disabled, or
nothing at all

I think it's best to return "" and keep the property there (least chance of breaking clients, although the change should still be announced). Raising a warning here would be very noisy.