Last modified: 2011-02-08 21:55:57 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T27760, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 25760 - counter property still reported by the API when $wgDisableCounters enabled
counter property still reported by the API when $wgDisableCounters enabled
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
unspecified
All All
: Normal trivial (vote)
: ---
Assigned To: Roan Kattouw
http://www.mediawiki.org/w/api.php?ac...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-11-03 00:03 UTC by Zak Greant
Modified: 2011-02-08 21:55 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Zak Greant 2010-11-03 00:03:09 UTC
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.
Comment 1 Krinkle 2010-11-03 00:04:04 UTC
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
Comment 2 MZMcBride 2010-11-03 00:05:44 UTC
(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.
Comment 3 Sam Reed (reedy) 2010-11-03 00:28:26 UTC
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
Comment 4 Roan Kattouw 2010-11-04 10:53:18 UTC
(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.
Comment 5 Sam Reed (reedy) 2010-11-04 13:11:07 UTC
r75999

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links