Page MenuHomePhabricator

Special:Block without JavaScript: "Other" field in Expiration section is required even if "Other" is not selected
Closed, ResolvedPublic2 Story PointsBUG REPORT

Description

What is the problem?

To submit the Special:Block form with JavaScript disabled, I am required to type some text into the Other input even if the "Other" expiration option has not been selected.

It does not seem to matter what you type into this field.

With JS enabled, this input disappears when another option is selected.

Steps to reproduce problem
  1. Disable javascript on the browser
  2. Go to Special:Block (need to be admin)
  3. Attempt to submit a block with an Expiration option other than "Other time:"

Expected behavior: You are not required to type any text into the text input box under "Expiration"
Observed behavior: You are prevented from submitting until you type any text in the input

Event Timeline

Restricted Application added subscribers: MGChecker, Aklapper. · View Herald TranscriptApr 9 2019, 5:00 PM

Assuming this is about MediaWiki-User-management when it comes to a related codebase.

Niharika triaged this task as Normal priority.Apr 9 2019, 5:33 PM
Niharika moved this task from Untriaged to Cards ready to be discussed on the Anti-Harassment board.
Niharika set the point value for this task to 2.Apr 18 2019, 6:21 PM
dbarratt renamed this task from [BUG] Special:Block without JavaScript: "Other" field in Expiration section is required even if "Other" is not selected to Special:Block without JavaScript: "Other" field in Expiration section is required even if "Other" is not selected.Jul 19 2019, 6:49 PM
dbarratt claimed this task.
dbarratt moved this task from Ready to In Progress on the Anti-Harassment (The Letter Song) board.

Change 524945 had a related patch set uploaded (by Dbarratt; owner: Dbarratt):
[mediawiki/core@master] Allow SelectWithInput to be marked as required and handle that dynamically

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

Change 524945 merged by jenkins-bot:
[mediawiki/core@master] Allow SelectWithInput to be marked as required and handle that dynamically

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

Without JS, it is not longer required to enter a value into the "Other" field (unless the "Other" dropdown is selected).

With JS, things behave as before (the "Other" field does not appear unless the "Other" dropdown is selected).

I also briefly tested Special:Block on mobile and IE11 (both with and without JS).

For regression purposes, I tested that there was nothing stopping me submitting a valid block (with and without JS).

Via the API: the error "Expiry time invalid." appears whenever the "expiry" parameter is invalid.

dbarratt closed this task as Resolved.Aug 8 2019, 9:33 PM