Page MenuHomePhabricator

ApiFeedContributions date filter broken after T120733
Closed, ResolvedPublic

Description

T120733 changes ContribsPager to use 'start' and 'end' parameters, rather than 'year' and 'month.' SpecialContributions was modified to convert the legacy 'year' and 'month' options to use the new 'start' and 'end' options, but ApiFeedContributions (the other class to use ContribsPager) was not modified, which breaks action=feedcontributions filtering by year/month.

[Fri Jun  2 08:40:12 2017] [hphp] [2178:7f9ee77ff700:88675:000001] [] \nNotice: Undefined index: start in
                    /srv/mediawiki/tags/2017-06-01_14:16:17/includes/specials/pagers/ContribsPager.php on line 82
[Fri Jun  2 08:40:12 2017] [hphp] [2178:7f9ee77ff700:88675:000002] [] \nNotice: Undefined index: end in
                    /srv/mediawiki/tags/2017-06-01_14:16:17/includes/specials/pagers/ContribsPager.php on line 85

Event Timeline

This happens because the changes for T120733 cause ContribsPager to expect 'start' and 'end' options. SpecialContributions converts the old 'date' and 'month' options to 'start' and 'end' options, but ApiFeedContributions (which is the only other class that uses ContribsPager) does not, which breaks ApiFeedContributions date filtering capabilities and causes these notices.

Sn1per renamed this task from Notice: Undefined index start/end in ContribsPager.php to ApiFeedContributions date filter broken after T120733.Jun 3 2017, 4:44 AM
Sn1per edited projects, added Regression, MediaWiki-Action-API; removed MediaWiki-General.
Sn1per updated the task description. (Show Details)

Change 357109 had a related patch set uploaded (by Sn1per; owner: Sn1per):
[mediawiki/core@master] Fix action=feedcontributions date filtering parameters

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

The above patch makes action=feedcontributions work again but doesn't change its parameters. I've made a new task (T166966) to deal with actually changing the API action parameters.

Change 357109 merged by jenkins-bot:
[mediawiki/core@master] Fix action=feedcontributions date filtering parameters

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