Page MenuHomePhabricator

Special:Contributions RSS has 1 more than limit
Closed, ResolvedPublic

Description

Consider: https://www.mediawiki.org/w/api.php?action=feedcontributions&user=Bawolff&feedformat=atom&limit=2 (note the limit=2)

Expected behaviour: 2 items

Actual behaviour: 3 items.

(Probably should check if related things also have this off by one error)


Version: 1.23.0
Severity: minor

Details

Reference
bz57874

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 2:39 AM
bzimport set Reference to bz57874.
bzimport added a subscriber: Unknown Object (MLST).
Bawolff created this task.Dec 2 2013, 7:41 PM

Api also gives a feedwatchlist action, which need also check.

The Pager class usually select one more than the limit to support the next links.
But the api is using the whole result and does not count himself, if the limit is reached. By the way: limit parameter is not legal supported by the api action feedcontributions (not documented on api.php).

Change 104551 had a related patch set uploaded by Umherirrender:
Special:Contributions RSS has 1 more than limit

https://gerrit.wikimedia.org/r/104551

(In reply to comment #1)

Api also gives a feedwatchlist action, which need also check.

feedwatchlist does not have this problem, because it does not support custom limits (Special:Watchlist does not support limits too).

Change 104551 merged by jenkins-bot:
action=feedcontributions no longer has one item more than limit

https://gerrit.wikimedia.org/r/104551

Merged. Should be deployed to WMF wikis with 1.23wmf9, see https://www.mediawiki.org/wiki/MediaWiki_1.23/Roadmap for the schedule.