Page MenuHomePhabricator

Upload form w/o wpDestFileWarningAck generates error in upload.js
Closed, ResolvedPublic

Description

The recent changes in SpecialUpload.php in revision 32077 have made the wpDestFileWarningAck hidden input disappear. I don't know if that isn't needed anymore, but in any case this generates a Javascript error in /skins-1.5/common/upload.js, line 102.

And while we're at it, line 99 of upload.js is missing a ';'. Instead of

if ( warning == '' || warning == '&nbsp' ) {

it should read

if ( warning == '' || warning == ' ' ) {


Version: unspecified
Severity: normal

Details

Reference
bz13448

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:07 PM
bzimport set Reference to bz13448.
bzimport added a subscriber: Unknown Object (MLST).

ID readded with r32217.

I leave this bug open because I am unsure if '&nbsp' is an typo or intent.

It's an error. The server (see function ajaxGetExistsWarning in SpecialUpload.php) returns a valid character entity ' ' if there is no warning. So the Javascript should test against that.