Page MenuHomePhabricator

SecurePoll: Duplicate input id for custom column labels
Open, MediumPublic5 Estimated Story PointsBUG REPORT


What is the problem?

When there are more than two questions, if you click Use custom messages for column labels for the 3rd question it will check the box for the 2nd question.

This is because the id attribute of the <input> element is the same for the 2nd and 3rd (or later) questions.

Steps to reproduce problem
  1. Go to Special:SecurePoll/create
  2. For "Poll Type", select one of the 4 "range" types
  3. Click the "Add another question" button twice
  4. In the very last (3rd) question, click the label (not the checkbox itself) which states "Use custom messages for column labels"

Expected behavior: The checkbox next to it is checked
Observed behavior: The checkbox for question 2 is checked


Browser: Firefox 78
Wiki(s): SecurePoll 2.0.0 (5c73aa8) 07:40, 11 February 2021.

Screenshots (if applicable):

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptThu, Feb 11, 2:09 PM
Niharika triaged this task as Medium priority.Thu, Feb 11, 2:10 PM
Niharika moved this task from Untriaged to Cards ready to be discussed on the Anti-Harassment board.
ARamirez_WMF set the point value for this task to 5.Thu, Feb 11, 5:24 PM
STran claimed this task.Sat, Feb 13, 7:26 AM

Change 664886 had a related patch set uploaded (by STran; owner: STran):
[mediawiki/core@master] Force unique ids for cloner-generated elements

Change 664886 merged by jenkins-bot:
[mediawiki/core@master] Force unique ids for cloner-generated elements