Page MenuHomePhabricator

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


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.

Event Timeline

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

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

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