Page MenuHomePhabricator

In TemplateData param editor, assigning an alias that's the same as the name doesn't cause an error
Open, Needs TriagePublic

Description

  1. Edit TemplateData with dedicated editor
  2. Edit a parameter in order to switch name and alias
  3. Add the name field's contents to the alias field
  4. Observe that there is no error message
  5. Edit the name field then restore it to its initial value
  6. Observe that its initial value is now considered invalid due to the alias

We would expect that either adding an alias that's the current name would display a validation error, or aliases that are the current name are silently discarded when the templatedata is written out. (The latter might be simpler, but would potentially be a subtle unexpected data-loss, since the modal's state wouldn't precisely match the written templatedata, and this could be caused by a typo the user didn't notice they made.)

Event Timeline

DLynch created this task.May 22 2019, 4:33 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 22 2019, 4:33 PM

@DLynch can you add some information on why a user would assign an alias that is the same as the name field, and what the repercussions of that might be?

marcella moved this task from To Triage to Revisit on the VisualEditor board.Jun 18 2019, 3:58 PM

@marcella: I don't think there's a reason to do it and save it -- it's meaningless from a data standpoint, which is why doing this edit in other ways already shows an error; this is just a way to reach that state without the error being shown.

The cases where it would come up would be either typos, or someone who's swapping the name/alias fields around and thus temporarily has them the same while it's in-progress.

@Pols12 was the one who reported this specific possibility on the previous/related ticket, and I can't rule out that they noticed it through some other situation.