I tried to install this module yesterday with plupload version 1.4.2 (1.4.3 is available as we speak).

The module installer fails to find the script and aborts. I have copied the plupload files to /sites/all/modules/plupload/plupload as advised in the README.

Per the following line, the installer expects plupload.js to be in /src/javascript

$js_file = $lib_dir .'/src/javascript/plupload.js';

However, plupload.js is actually in /js

The result is the The plupload library files are either missing or not readable. message and installation failure.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dallen’s picture

I've changed the lines to read:
$path = drupal_get_path('module', 'plupload');
drupal_add_js($path . '/plupload/js/plupload.js');
drupal_add_js($path . '/plupload/js/plupload.html5.js');
drupal_add_js($path . '/plupload/js/jquery.plupload.queue/jquery.plupload.queue.js');
drupal_add_js($path . '/plupload/js/plupload.flash.js');
drupal_add_css($path .'/plupload/examples/jquery.plupload.queue/css/jquery.ui.plupload.css');

But the widget isn't displaying. But it's functional.

dallen’s picture

Correction
drupal_add_css($path .'/plupload/examples/jquery.plupload.queue/css/jquery.ui.plupload.css');
and should probably be
drupal_add_css($path .'/plupload/js/jquery.plupload.queue/css/jquery.ui.plupload.css');

Which helps, but isn't quite there.

marktheshark’s picture

I assume older versions of the plupload bundle had this directory structure?

If so, perhaps there should be a guideline for the max supported library version.

justintime’s picture

Title: plupload structure not the same as expected by module installer » plupload library versions >= 1.4.3 change file paths

I just re-installed my laptop setup this week, and had no issues with plupload 1.4.2. Looking at 1.4.3.2, they have indeed re-arranged the distribution.

You guys are on the right track, but for a "quick" fix, you probably just want to point to plupload.full.js. I'm stranded at the airport and don't have the resources to really work on this just now.

So, the easiest thing to do in the meantime, is to download 1.4.2 of plupload. The permanent fix will need to determine if we're running on on >= 1.4.3 and change the paths appropriately.

I don't maintain any of the 7.x code of plupload, but it's likely going to be impacted as well.

Infinitee’s picture

Watching

EWB’s picture

I am having a similar issue using 1.4.3.2. I would like to try downloading 1.4.2 as suggested by justintime but can't seem to find it - can someone please provide a link? Thanks

justintime’s picture

EWB’s picture

Perfect. thanks. And, btw, using 1.4.2 fixed the problems I was having.

marktheshark’s picture

As a workaround, I am using 1.4.2 at the moment. Very handy module, I have to say, thank you!

Perhaps the module can be enhanced to locate the files itself, as some other modules do for their respective dependencies.

David_Rothstein’s picture

Regarding the D7 version of the module, it doesn't search for src/javascript/plupload.js as far as I know, so hopefully that means it isn't affected. I haven't tested, though.

Not sure if it actually makes sense for the D6 version to ever look for anything in src/ though either? Even for earlier versions of the plupload library, you don't really need that directory there to use the library (you just need the actual minified JS which was in js/ to begin with, so that seems like the best place to search no matter what).

justintime’s picture

Honestly, that code that pulls it from src/ was there before I was brought on as maintainer. I had noticed it, and wondered why we weren't using the minified version, but guessed that grabbing that "full" version made it compatible with aggregation/compression in core and related modules in contrib.

I'm guessing greggles was the one who wrote that originally, maybe he can chime in?

brunorios1’s picture

subscribing...

justintime’s picture

Status: Active » Needs review
FileSize
4.03 KB

Okay, you can thank my 3 year old son for taking such a long nap for this one :)

Attached patch is a combo of resolving this issue and [#102190] since they very closely relate.

As far as the paths we check for, I followed DamienMcKenna's recommendation over on #902410: plupload_library() requires plupload library to be in module folder rather than flexible or sites/all/libraries.

justintime’s picture

FileSize
4.43 KB

Quick fix for the patch above. If you get a white page on the first enabling of the module with the patch, this redo is for you.

mjh2901’s picture

Version: 6.x-1.x-dev » 7.x-1.0-beta2

I downloaded the older version from github as suggested in #7 worked fantastically! Since there needs to be a patch written ( I wish I had the skills to help there ) Why not add a couple of sentences to the front page of the module. Attention plupload requires version 1.4.2 of the plupload library go to https://github.com/moxiecode/plupload/downloads and download 1.4.2, all newer version will not work with plupload.

Thanks

justintime’s picture

Version: 7.x-1.0-beta2 » 6.x-1.x-dev

@mjh2901 - There are separate issues (and patches to test) for the 7.x version of the module. Katbailey just posted a 7.x patch yesterday.

No notes on the front page because we need testers for the patches :)

shaisachs’s picture

Both patches (#13 and #14) work fine for me. I'm using Plupload 1.4.3.2.

And by the way, this is a great module, thanks!!

shaisachs’s picture

The patch in #14 works fine with plupload 1.4.2 as well.

justintime’s picture

FileSize
5.06 KB

And, one more try :)

I stoleborrowed some of katbailey's ideas, and made the code a bit cleaner. I also found a bug where browsers using the flash widget in 1.4.3+ wouldn't work.

I'd love it if I could get at least one tester to give a yay or nay on this before I commit it.

shaisachs’s picture

Patch in #19 works fine with Plupload 1.4.3 on both FF 3 (using HTML 5) and IE 7 (using Flash)... unless you have Clean URLs turned off, in which case the flash_swf_url in the Javascript comes out as '/?q=sites/all/libraries/plupload/js/plupload.flash.swf'.

justintime’s picture

Hmm, I have to admit I don't really test much of anything with Clean URL's turned off. There's a pretty good chance that Flash in IE with Clean URL's turned off before the patch was broken too - can you comment on that?

shaisachs’s picture

FileSize
5.07 KB

As you suspected, the patch in #14 also does not work in IE7 with clean URLs disabled. However, the enclosed patch works, as far as I can tell, in Chrome 11, Firefox 3, and IE7, with clean URLs disabled, for Plupload 1.4.3.

justintime’s picture

Status: Needs review » Fixed

Thanks @shaisachs, your tweak included in this commit to 6.x-1.x. Marking as fixed.

shaisachs’s picture

You're very welcome, thanks for the great module!

rickvug’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Fixed » Patch (to be ported)

This hasn't been ported to the 7.x-1.x-dev branch yet.

justintime’s picture

Version: 7.x-1.x-dev » 6.x-1.x-dev
Status: Patch (to be ported) » Fixed

Please search the issue queue before making assumptions: #1143142: Update to 1.4.3.x?.

rickvug’s picture

Sorry about that. I should have known better with the D7 version being quite different and all.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

kirilius’s picture

I understand that at some point there was a problem with the changed file structure of the plupload library but that was fixed?
However I still cannot get plupload to show. I am using the latest dev version from Aug 4, 2011.

Does anybody know whether the latest readme is correct? Also is there a recommended version of the plupload library to use? The One I just downloaded is v 1_5_1_1.

Thanks!