Page MenuHomePhabricator

[betalabs-regression] RC page - blank names for filter selection can be saved
Closed, ResolvedPublic


The issue is not present in wmf.7 - the attempt to save a blank name will display a red outline indicating invalid input.

  1. On RC page with filters enabled and several filters selected, click on the bookmark icon and press the spacebar several times to enter white spaces as a filter name.
  2. 'Create filter' button is active and can be clicked to save the filter selection with a blank name.
  3. Rename any filter by entering white spaces as a name - the issue is present in production.
  4. The Saved filters will display blank names:

Screen Shot 2017-06-29 at 3.00.37 PM.png (352×358 px, 15 KB)

Event Timeline

Etonkovidova renamed this task from [betalabs-regression] Filters with blank names can be saved to [betalabs-regression] RC page - blank names for filter selection can be saved.Jun 29 2017, 10:05 PM

This shouldn't happen anymore, can you re-check? The "Apply" button should be disabled when the text is empty, and the saved query shouldn't be saved at all if there's nothing in the input, including when you press enter.

@Mooeypoo Re-checked -the issue is still present in betalabs.

Change 362436 had a related patch set uploaded (by Mooeypoo; owner: Mooeypoo):
[mediawiki/core@master] RCFilters: Trim spaces in saved query names

Oy, sorry, when we changed the way validation works, I removed the condition to treat spaces as empty.
Fixed in the commit above.

Change 362436 merged by jenkins-bot:
[mediawiki/core@master] RCFilters: Trim spaces in saved query names

Checked the fix in betalabs - empty filter names (either as new ones or via renaming) cannot be saved anymore.

Etonkovidova triaged this task as Low priority.