WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 5 years ago

#6979 closed defect (bug) (fixed)

Flash Player 10 breaks the media uploader

Reported by: tcloer Owned by:
Milestone: 2.7 Priority: high
Severity: major Version: 2.6
Component: Upload Keywords: flash
Focuses: Cc:

Description

Adobe has released a beta of the new Flash Player 10 "Astro" at Adobe Labs.
http://www.adobe.com/go/astro

Once this is installed, the Flash-based media uploader in 2.5.x stops working.

Attachments (21)

flash10.diff (3.8 KB) - added by ryan 6 years ago.
Disable flash uploader if flash 10
swfupload2.2.diff (90.0 KB) - added by filosofo 5 years ago.
patch with swfupload2.2.0 beta and modified js
swfupload.1.diff (66.9 KB) - added by filosofo 5 years ago.
swfupload.2.diff (4.0 KB) - added by filosofo 5 years ago.
swfupload.3.diff (12.5 KB) - added by filosofo 5 years ago.
swfupload.4.diff (2.5 KB) - added by filosofo 5 years ago.
swfupload.5.diff (516 bytes) - added by filosofo 5 years ago.
swfupload.6.diff (832 bytes) - added by filosofo 5 years ago.
swfupload.7.diff (1.7 KB) - added by filosofo 5 years ago.
swfupload.8.diff (473 bytes) - added by filosofo 5 years ago.
swfupload.2.2.0-beta2.diff (3.5 KB) - added by filosofo 5 years ago.
new patch for beta-2 of 2.2.0
swfupload.swfobject.js (12.4 KB) - added by filosofo 5 years ago.
swfupload.swf (11.7 KB) - added by filosofo 5 years ago.
swfupload.queue.js (2.6 KB) - added by filosofo 5 years ago.
swfupload.js (35.8 KB) - added by filosofo 5 years ago.
upload.png (896 bytes) - added by filosofo 5 years ago.
swfupload.cookies.js (1.6 KB) - added by filosofo 5 years ago.
media-upload.diff (2.1 KB) - added by filosofo 5 years ago.
[9421] didn't pick this up
flash_degradation.diff (2.8 KB) - added by filosofo 5 years ago.
visibility-fix.diff (808 bytes) - added by filosofo 5 years ago.
swfupload_show_timing.diff (1.4 KB) - added by filosofo 5 years ago.

Download all attachments as: .zip

Change History (56)

comment:1 follow-up: zamoose6 years ago

  • Component changed from General to Administration
  • Milestone changed from 2.7 to 2.6
  • Priority changed from normal to lowest
  • Severity changed from normal to trivial
  • Version changed from 2.5.1 to 2.6

Sounds like an Adobe issue, not a WordPress one.

comment:2 in reply to: ↑ 1 tcloer6 years ago

Replying to zamoose:

Sounds like an Adobe issue, not a WordPress one.

I don't think so. After Flash Player 9 came out, 62% of the installed base upgraded in the first three months. I bet this will happen with FP 10 as well. So maybe someone should at least take a look at the changes in the new version and see if the WordPress uploader could be adapted accordingly...

comment:3 zamoose6 years ago

Except it's a beta release. No sense spinning any wheels until

  1. 10 is actually released
  2. We have evidence that the final is messing up the uploader
  3. We can verify that the changes will not affect users staying at Flash 9

comment:4 DD326 years ago

As the Flash uploader is a External application, They'll release a new release to stay up to date, I do not believe WordPress itself will have to change anything (Other than to include the latest release in the next WP release)

http://swfupload.org/forum/generaldiscussion/532

I've installed the FP 10 beta and found that SWFUpload does not work. We'll be working on this and will probably have another v2 release before Flash Player 10 is released.

comment:5 Otto426 years ago

Update:
http://swfupload.org/forum/generaldiscussion/551

Adobe may have to bring this functionality back into Flash 10 before release, as the changes in Flash 10 kills the possibilities of flash-based file uploaders.

comment:6 Otto426 years ago

  • Component changed from Administration to General
  • Keywords adobe flash astro fp 10 removed
  • Priority changed from lowest to normal
  • Severity changed from trivial to major
  • Summary changed from New "Astro" Flash Player 10 (Beta) breaks the media uploader to Flash Player 10 breaks the media uploader

Welp, Adobe went ahead and released Flash 10 without fixing this issue, so now everybody gets to deal with it.

SWFUpload 2.2 alpha has a method of working around it, where they create an image based button. Sucks, but there you go.

The YUI Uploader has been updated and works in one of two ways, where it can either do the image thing, or render a transparent Flash button on top of your button element, allowing the click through to actually work.

We might want to consider switching to YUI Uploader to deal with this.

YUI: http://developer.yahoo.com/yui/uploader/

ryan6 years ago

Disable flash uploader if flash 10

comment:7 ryan6 years ago

  • Milestone changed from 2.9 to 2.7

That disables the flash uploader for flash version 10. Just in case we don't get a proper fix in time for 2.7.

comment:8 ryan6 years ago

Another option is using the Gears upload capabilities.

comment:9 Otto426 years ago

Hmmm... given that Flash 10 is horked up and likely to stay that way, it might be worthwhile to switch to it, or at least to add it as an option if the user has the Gears capability installed.

Uploading a file with gears seems to be straightforward enough. Something along these lines, but obviously more complex:

var desktop = google.gears.factory.create('beta.desktop');

function callback(files) {
	for (var i in files) {
		//files[i].name is the filename
		//files[i].blob is the content of the file
		
		var request = google.gears.factory.create('beta.httprequest');
		request.open('POST', 'admin-ajax.php');
		request.onreadystatechange = function() {
			if (request.readyState == 4) {
				// upload is complete
			}
		};
		request.send(files[i].blob);

		// some kind of code to make it wait for the complete signal
	}
}

desktop.openFiles(callback);

And so on. Look here if somebody wants to take a stab at it, I might later: http://code.google.com/apis/gears/api_httprequest.html

comment:10 ryan6 years ago

  • Component changed from General to Upload
  • Keywords flash added
  • Owner anonymous deleted

comment:11 ryan6 years ago

  • Priority changed from normal to high

comment:12 RyanWilliams5 years ago

Yep, this clearly needs addressing now that Flash Player 10 is officially out, officially penetrating the market at a rapid rate (users of Flash will be automatically prompted to upgrade after about 30 days, which we're very quickly getting towards), and officially still broken.

Whether it's a WordPress issue or an Adobe issue, it needs resolving on the WordPress end. This is going to affect the majority of people very soon.

comment:13 DD325 years ago

SwfUpload 2.1.0 Beta was released last week, Would it be worth updating to the beta release assuming the final will be available before WP 2.7 ships? The beta release should give testers some kind of idea if its going to be worth looking into an alternate upload mechanism.

comment:14 DD325 years ago

SwfUpload 2.2.0 Beta i meant of course.. It has Flash 10 support, However has droped Flash8 support.

comment:15 follow-up: ryan5 years ago

If someone wants to drop in the swf beta and see how it works, that would be helpful.

comment:16 in reply to: ↑ 15 ; follow-up: filosofo5 years ago

Replying to ryan:

If someone wants to drop in the swf beta and see how it works, that would be helpful.

If no one else is currently doing so, I'll make a patch that integrates SWFUpload . I've been using the latest beta of SWFUpload for another project, so I have a good idea about what needs to be changed. The first things that come to mind:

  • You can't attach an event to html buttons to trigger the event that opens the file browsing window, for security purposes in Flash 10.
  • The graceful degradation plugin has been replaced with another.

Based on Otto42's suggestion, how about having SWFUpload degrade to Gears, if available, or to regular upload if not.

comment:17 in reply to: ↑ 16 Otto425 years ago

Replying to filosofo:

Based on Otto42's suggestion, how about having SWFUpload degrade to Gears, if available, or to regular upload if not.

Let's get the swf working again first, and then look at the gears idea. I think that if Gears is available, then that should be the default mechanism, and then degrade to SWF, but before that can be done, a gears mechanism actually needs to be written. I'll see about figuring Gears out, and maybe having it there for 2.8.

comment:18 ryan5 years ago

Or even lose swfupload if we go with gears. The swfupload experience with flash 10 is degraded, yes?

I don't know if we can work gears in for 2.7. Maybe use swfupload beta for now and save gears for a dot release?

comment:19 filosofo5 years ago

As far as the experience being degraded, I think the main thing is that you can't open a file browser dialog window using an event attached to an html element; you can use a Flash element, though.

comment:20 RyanWilliams5 years ago

I'm not convinced using Gears as the primary mechanism is the way to go (that is, those without Gears get a significantly inferior experience with the HTML-based version).

Flash has a much higher penetration rate than Gears by far, even amongst savvy users and developers. If the Flash-based mechanism can be fixed then that should be what's opted for IMO.

filosofo5 years ago

patch with swfupload2.2.0 beta and modified js

comment:21 filosofo5 years ago

I've added a patch for SWFUpload 2.2.0 beta.

The upload.png image is meant to be the background image of the flash-generated button.

The problem is that in Flash 10 you can't trigger the file browse dialog window from an event attached to normal html, so you have to create a button in Flash. SWFUpload will do that with text of your choice, but its styling is limited to a few styles or a custom background image.

The background image, if you use that, has to be in "sprite" form, which means that you have four images one above the other: normal view, hover view, click view, and disabled. See the SWFUpload documentation here under button_image_url.

comment:22 Otto425 years ago

Ugh. So that means a delay while Flash loads and displays something, as well as having to use a button that doesn't look like anything else in the entire browser?

Gears is looking better and better.

comment:23 Kelson5 years ago

In the event that Gears does replace Flash as the primary method in the future, Flash should still be included as an intermediate fallback. Flash runs on a number of platform/browser combinations where Gears doesn't, at least not yet: Opera, for instance, or Safari on Windows, or anything on 64-bit Linux (Flash runs on 64bit Linux relatively easily through nspluginwrapper, but while I'm told you can run gears through it, I haven't been able to get it to work), and while it'll run on other Gecko browsers than Firefox, you have to jump through hoops to do it.

filosofo5 years ago

filosofo5 years ago

filosofo5 years ago

filosofo5 years ago

filosofo5 years ago

filosofo5 years ago

filosofo5 years ago

filosofo5 years ago

filosofo5 years ago

new patch for beta-2 of 2.2.0

filosofo5 years ago

filosofo5 years ago

filosofo5 years ago

filosofo5 years ago

filosofo5 years ago

filosofo5 years ago

comment:24 filosofo5 years ago

Updated patch for 2.2.0 beta 2 of SWFupload.

Please ignore everything attached before swfupload.2.2.0-beta2.diff

swfupload.swf and swfupload.js go in wp-includes/js/swfupload/

swfupload.swfobject.js, swfupload.queue.js, and swfupload.cookies.js go in wp-includes/js/swfupload/plugins/

upload.png goes in wp-includes/images/

comment:25 ryan5 years ago

(In [9421]) SWFUpload 2.2.0 beta 2 with Flash 10 support. Props filosofo. see #6979

filosofo5 years ago

[9421] didn't pick this up

comment:26 ryan5 years ago

(In [9423]) SWFUpload 2.2.0 beta 2 with Flash 10 support. Props filosofo. see #6979

comment:27 Otto425 years ago

Possible bug here: It tells me that I'm using the Browser uploader, even though the Flash uploader is directly above that message and working. Firefox.

filosofo5 years ago

comment:28 filosofo5 years ago

I've added a patch, flash_degradation.diff, which addresses the problem Otto42 mentions.

comment:29 ryan5 years ago

(In [9438]) Flash degradation fixes from filsofo. see #6979

filosofo5 years ago

comment:30 filosofo5 years ago

patch visibility-fix.diff fixes the blank page on wp-admin/media-new.php

comment:31 ryan5 years ago

(In [9458]) media-new visibility fix. Props filosoof. see #6979

comment:32 filosofo5 years ago

I've uploaded a new patch to address the problem that some people have with the upload button showing up.

Basically, the problem seems to have to do with the erratic timing that the Flash app calls JavaScript methods; sometimes they're too early for JavaScript to correctly access the DOM it seems, so that the Flash object remains hidden.

comment:33 ryan5 years ago

(In [9465]) Make sure Upload button always shows. Props filosofo. see #6979

comment:34 ryan5 years ago

Seems pretty solid now. Close?

comment:35 ryan5 years ago

  • Resolution set to fixed
  • Status changed from new to closed

Closing. Reopen if needed.

Note: See TracTickets for help on using tickets.