Page MenuHomePhabricator

RCFilters URL is inconsistent with its results between the front- and back-end
Closed, ResolvedPublic

Description

Before shortening the URL, all parameters existed even if they were false ('0' or '') which meant that this point was somewht moot: all parameters were requested, which overrode the behavior of the backend (merging requests with defaults)

However, once we shortened the URL, the merging with defaults is actually affecting the results, but the front-end did not expect that, thinking that the results it requests are what it shows in the URL and in its state. That is not correct.

After a discussion we decided to add 'urlversion=2' to all urls that are created by the RCFilters system, and have the backend respect this parameter to say that in that case it should not merge defaults (but rather ask for exactly the requested param set).

The frontend then checks first to see whether urlversion=2 exists in the URL. If it doesn't, it first "corrects" its model to understand that defaults were merged into the state, and then it outputs urlversion=2 into the URL, making the system always consistent and the URL always represent what exactly is being outputted and the state of the filters, regardless of differences in defaults between users or across time (in case a wiki default is changed).

Note: The commit attached is for front-end. There is an upcoming fix for making sure the backend respects urlversion=2 and, in cases it exists, does not merge defaults into the request.


Now excludes saved query. See T166908: ChangesListSpecialPage backend: Respect saved query if no parameters

Details

Event Timeline

Mooeypoo created this task.Jun 4 2017, 8:27 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 4 2017, 8:27 AM

Change 357116 had a related patch set uploaded (by Mooeypoo; owner: Mooeypoo):
[mediawiki/core@master] RCFilters: Frontend URL follow backend rules and add 'urlversion=2'

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

Change 357116 merged by jenkins-bot:
[mediawiki/core@master] RCFilters: Make frontend URL follow backend rules and add 'urlversion=2'

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

Etonkovidova closed this task as Resolved.Jul 14 2017, 6:08 PM
Etonkovidova triaged this task as Medium priority.