Page MenuHomePhabricator

Special:Upload fails to deal with file names with more than 256 characters
Closed, ResolvedPublic

Description

When using the normal upload form with a too long filename the Upload form (not Upload wizard) fails to deal with this. Instead you get an ever looping loading symbol.

In fact if you try to change the filename you get a second loading symbol. (Which disappears if new filename is short enough)

The debug console output is:

Uncaught Error: Unable to parse                      mediawiki.Title.js:24
Title                                                mediawiki.Title.js:24
window.wgUploadWarningObj.uploadWarning.timeout      mediawiki.special.upload.js:66
window.wgUploadWarningObj.uploadWarning.checkNow     mediawiki.special.upload.js:54
(anonymous function)                                 mediawiki.special.upload.js:149
jQuery.event.dispatch                                load.php?debug=true&lang=sv&modules=jquery%2Cmediawiki&only=scripts&skin=monobook&version=20150113T…:4665
elemData.handle                                      load.php?debug=true&lang=sv&modules=jquery%2Cmediawiki&only=scripts&skin=monobook&version=20150113T…:4333

To recreate:

  1. Go to Special:Upload&uploadformstyle=basic
  2. Select any png image not already on Commons
  3. Set the name to something with more than 256 characters (e.g. "Stora Kopparbärgz grufva – efter sin rätta längd och bredd geometrice afsatt ther iämpte orthernes högd och diupheet warder medh påtäcknade bookstäfvers förklaringh tillkienna gifven, afmäten och rijtat a.o 1662 - Kungliga Bisdasdasdasdasdasdassblioteket.png")

Event Timeline

Lokal_Profil raised the priority of this task from to Needs Triage.
Lokal_Profil updated the task description. (Show Details)
Lokal_Profil added a subscriber: Lokal_Profil.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 21 2015, 10:36 AM
Aklapper renamed this task from Special:Upload fails to deal with too long filenames to Special:Upload fails to deal with file names with more than 256 characters.Jan 24 2015, 1:55 AM
Aklapper triaged this task as Low priority.
Aklapper set Security to None.
Steinsplitter moved this task from Incoming to Uploading on the Commons board.
Jdforrester-WMF moved this task from Untriaged to Backlog on the Multimedia board.Sep 4 2015, 5:53 PM
Restricted Application added subscribers: Steinsplitter, Matanya. · View Herald TranscriptSep 4 2015, 5:53 PM
matmarex closed this task as Resolved.Sep 30 2016, 7:18 PM
matmarex claimed this task.
matmarex added a subscriber: matmarex.

This no longer occurs. An error message is correctly shown. Looks like I fixed this in rMWf42e1d7f216f: mediawiki.special.upload: Don't fail when invalid title is given.