Page MenuHomePhabricator

UploadWizard broken in Safari 5
Closed, ResolvedPublic

Description

In Safari 5, UploadWizard currently will fail after selecting a file to upload. The console shows the following error message:

TypeError: 'undefined' is not an object (evaluating 'file.size').

This is triggered in line 32 in mw.FormDataTransport.js.


Version: unspecified
Severity: major

Details

Reference
bz37150

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 12:24 AM
bzimport added a project: UploadWizard.
bzimport set Reference to bz37150.
bzimport added a subscriber: Unknown Object (MLST).

I have a hunch that this has to do with the new handling of uploads right away--some of the magic might have created empty Upload objects. I'll make sure we do proper emptying of the bins once we've thrown them out. Funny that no other browsers complained, though!

Turns out we weren't checking for FileApi functionality in our decision to use one upload handler or the other. This patch ought to do the trick: https://gerrit.wikimedia.org/r/9140

That being said, I haven't tested it, it would be nice to have a labs instance to test these sorts of things....

Can you try testing it through BrowserStack or CrossBrowserTesting (either should allow you to set up a tunnel to localhost)?

I can tomorrow, but my browser at home doesn't like the Java applet for some reason.

I've confirmed that this fixes the problem and doesn't break existing functionality. I've also reviewed and merged the change in Gerrit.

BTW, we do have virtual machines set up for testing the various versions of Explorer (https://secure.wikimedia.org/wikipedia/office/wiki/VirtualMachines), but we don't have one for Safari (since about half of the developers have it installed locally). I haven't had any trouble personally with BrowserStack in Firefox. Might want to make sure your Java runtime environment is fully up to date.

Kaldari, thanks for the help! I did apt-get update last night and apt-get install icedtea6-plugin openjdk-6-jre just this morning, so I doubt it's that--maybe I need to upgrade to openjdk-7, but it doesn't appear to be in my repositories. I hardly ever need Java on this machine anyway, so it's no problem. I know it works at the office.

Confirmed working on test2; should therefore be fixed on live Commons after the Wednesday deployment.

Although now multi-file select doesn't work in Safari - not sure it ever did. It's such a useful feature that it may be worth the effort of trying to make it work with browsers with partial File API implementations.

I don't believe multi-file select ever worked in Safari.

The new checks for multi-file select are actually checking for the requisite technology in the browser, so if UW doesn't let Safari do it anymore, it probably never worked....

Gilles raised the priority of this task from High to Unbreak Now!.Dec 4 2014, 10:21 AM
Gilles moved this task from Untriaged to Done on the Multimedia board.
Gilles lowered the priority of this task from Unbreak Now! to High.Dec 4 2014, 11:21 AM