Page MenuHomePhabricator

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


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)

long_title_bug.png (230×716 px, 19 KB)

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 subscribed.
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.
matmarex claimed this task.
matmarex subscribed.

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.

pasted_file (512×1 px, 72 KB)