Page MenuHomePhabricator

[regression] Refreshing the page makes filters vanish
Closed, ResolvedPublic

Description

Found this while playing around, adding for review and QA purposes with a fix.

To reproduce:

  1. Go to Special:RecentChanges
  2. Clear out filters
  3. Choose "Newcomers" and "Changes by you"
  4. Refresh.

Result - "Changes by you vanishes" (!!!)

The reason for this is that we treated parameters as numbers (0 and 1) when in fact they are strings ('0' and '1') and so when we check for truthiness, both !'0' and !'1' are true, which made all 'full coverage' groups always all-true, and hence, all-false, which made the filter disappear in the normalization when refreshing.

Unit tests also collected parameters as if they're numbers, which is not what we do in reality, so unit tests passed even though things failed in reality. I fixed that in the commit as well.

Details

Related Gerrit Patches:

Event Timeline

Mooeypoo created this task.May 13 2017, 8:22 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 13 2017, 8:22 PM

Change 353713 had a related patch set uploaded (by Mooeypoo; owner: Mooeypoo):
[mediawiki/core@master] RCFilters: Fix getFilterRepresentation to consider '0' as false

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

Mooeypoo triaged this task as High priority.May 13 2017, 8:28 PM

Change 353713 merged by jenkins-bot:
[mediawiki/core@master] RCFilters: Fix getFilterRepresentation to consider '0' as false

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

Etonkovidova added a subscriber: Etonkovidova.EditedMay 16 2017, 7:40 PM

The issue seems to be related to the scenario T165206: RC filters bookmarks issues :

(1) The selection of filters will be discarded - only highlighting is preserved.

So, the fix resolves this issue and the two of the bookmarking issues reported in T165206 making it much less severe.

QA Recommendation: Resolve

jmatazzoni closed this task as Resolved.May 27 2017, 12:03 AM