[go: nahoru, domu]

Page MenuHomePhabricator

[beta] UploadWizard - saving empty Date filed triggers TypeError
Closed, ResolvedPublic

Description

Steps to reproduce:

Two scenarios.
Scenario 1 removing any input from the Date field and attempting save

  1. On commons beta Special:UploadWiard start uploading a file.
  2. In the Describe step remove an automatically populated date from the Date field or you may enter selected date and then remove you input entirely.
  3. Click on Publish files

Scenario 2

  1. On commons beta Special:UploadWiard start uploading a file. Choose "someone else's work" and fill in all required fields.
  2. In the Describe step - the Date field will be blank (by design). Fill in Title and Caption fields, leave blank Date field.
  3. Click on Publish files

What happens:

  • the Console displays
jQuery.Deferred exception: Cannot read properties of undefined (reading 'value') TypeError: Cannot read properties of undefined (reading 'value')

(for the Scenario 2)

Query.Deferred exception: Cannot read properties of undefined (reading 'top') TypeError: Cannot read properties of undefined (reading 'top')
  • Above the Publish button the error message is displayed, but there will be no indication that the Date field has an error
    Screen Shot 2024-07-04 at 4.45.38 PM.png (1×2 px, 321 KB)

Note: the Console Type error is not present in commons wmf.12

Event Timeline

Change #1052278 had a related patch set uploaded (by Matthias Mullie; author: Matthias Mullie):

[mediawiki/extensions/UploadWizard@master] Fix empty-date validation

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

Change #1052278 merged by jenkins-bot:

[mediawiki/extensions/UploadWizard@master] Fix empty-date validation

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

Checked on commons beta - the issue is fixed.