Page MenuHomePhabricator

Warning dialog displays incorrect title in a specific scenario
Open, Needs TriagePublic

Description

If you trigger the warning dialog for removing a template (by clicking on the trashcan icon) and immediately afterward trigger the warning dialog for unexpected inputs (by clicking Insert when there are missing Required values), then the warning dialog for unexpected inputs displays the wrong title. (It displays the title of the template-removal warning dialog rather than its own.)

Steps to reproduce:

  1. From any wiki page, click Edit to open the wikitext editor.
  2. Make sure you are in Source Editing mode.
  3. Click the puzzle icon in the toolbar to open the TemplateWizard.
  4. Select a template that has 3 or more Required values.
  5. Fill in SOME -- but not all -- of the Required value fields.
  6. Click the trashcan icon, as if you were going to discard the template.
  7. When the warning message appears, click Cancel to return to the template wizard.
  8. Once you are back in the wizard, click the Insert button.

Expected result: You get the following warning/error dialog:

Actual result: The dialog displays the title of the LAST warning/error dialog ("Remove Template?") rather than its own.

This can be tricky to reproduce, because the TemplateWizard doesn't consistently flag missing Required values (see bug "Inconsistent handling of missing Required values in TemplateWizard"). To maximize your success in reproducing this, feel free to use the same template I used -- it's called Infobox-book-information and it's on test.wikipedia.org. In my tests, I left the first (top) Required value BLANK, and filled out the other two.

Event Timeline

Barbvd created this task.Oct 3 2018, 5:07 AM
Restricted Application added a project: Community-Tech. · View Herald TranscriptOct 3 2018, 5:07 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Good catch, @Barbvd. I have included this bug in the other one you reported T206096: Inconsistent handling of missing Required values in TemplateWizard because I think they are connected. I will still keep this ticket open to discuss with engineers if these are separate bugs.