Page MenuHomePhabricator

Clicking 'Add a caption in another language' removes the input box for the previous caption
Closed, ResolvedPublic

Description

The current problem:

Somehow, this bug manifested recently in UploadWizard. See the below GIF:

This displays the following incorrect behaviors:

  • Clicking add caption removes the above input box
  • the new caption field automatically defaults to a language (seemingly based on alphabetical order)
  • the trash can icon for the new caption field is offset to the left (moves back to proper alignment if another caption gets added though)

If the user completes submission of a form with these issues, captions entered in the top fields that "disappear" are replaced with the text value of the last entered caption, whatever it is.

Event Timeline

Restricted Application added a project: Wikidata. · View Herald TranscriptJan 17 2019, 4:21 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Ramsey-WMF triaged this task as Unbreak Now! priority.Jan 17 2019, 4:22 AM

This is a pretty big one. Fix ASAP please. Looking at @matthiasmullie and/or @Jdforrester-WMF for fix and knowledge on how this might have broken after working fine initially?

Restricted Application added subscribers: Liuxinyu970226, TerraCodes. · View Herald TranscriptJan 17 2019, 4:22 AM
Ramsey-WMF moved this task from Untriaged to Next up on the Multimedia board.

Change 484855 had a related patch set uploaded (by Matthias Mullie; owner: Matthias Mullie):
[mediawiki/extensions/UploadWizard@master] Don't reuse existing input object

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

Change 484855 merged by jenkins-bot:
[mediawiki/extensions/UploadWizard@master] Don't reuse existing input object

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

Change 485001 had a related patch set uploaded (by Matthias Mullie; owner: Matthias Mullie):
[mediawiki/extensions/UploadWizard@wmf/1.33.0-wmf.13] Don't reuse existing input object

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

Change 485001 merged by jenkins-bot:
[mediawiki/extensions/UploadWizard@wmf/1.33.0-wmf.13] Don't reuse existing input object

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

Mentioned in SAL (#wikimedia-operations) [2019-01-17T12:46:56Z] <dcausse@deploy1001> Synchronized php-1.33.0-wmf.13/extensions/UploadWizard/: T214007: Don't reuse existing input object (duration: 00m 53s)

matthiasmullie closed this task as Resolved.Jan 17 2019, 12:57 PM
matthiasmullie claimed this task.

I made a mistake in the patch for T213240: When pressing enter/return, file caption input text boxes should not add a newline which caused the input field to be reused for the next language, rather than creating a new one per language.
Fixed, merged & deployed.