The default download for plupload library is now the 2.x version which does not work with this module without some directory/file name changes. I suggest that the README explicitly state to use the 1.x branch of plupload which is still available. Also note that 1.5.8 is the final 1.x release.

Issue fork plupload-2098555

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

slashrsm’s picture

Would it be possible to provide support for both? How many changes would we need to support 2.x?

nessunluogo’s picture

A first (easy) step could be to change documentation to clear incompatibility with 2.x version.
Actually version 1.5.7 can be downloaded here: http://plupload.com/downloads/plupload_1_5_7.zip

slashrsm’s picture

Added to README.txt.

gmclelland’s picture

@slashrsm - This also needs to be updated on the project page

Compatibility warning

Library version v2.0.0 and later are currently unsupported. Latest supported version of library is v1.5.7, which can be downloaded from http://plupload.com/downloads/plupload_1_5_7.zip.

I would change the link to https://github.com/moxiecode/plupload/archive/v1.5.8.zip in the README.txt and project page since that is what is white listed on drupal.org see https://drupal.org/node/1404088

slashrsm’s picture

Updated on project page.

I would change the link to https://github.com/moxiecode/plupload/archive/v1.5.8.zip in the README.txt and project page since that is what is white listed on drupal.org see https://drupal.org/node/1404088

Do not understand. Sorry..

gmclelland’s picture

In case people try to use that link in their distributions that are hosted on drupal.org. Ex. https://drupal.org/project/media_dev or https://drupal.org/project/scald_galaxy

https://drupal.org/packaging-whitelist
https://drupal.org/project/drupalorg_whitelist

In the current readme.txt it says to use https://github.com/moxiecode/plupload/archive/v1.5.8.tar.gz, but that won't work with the Drupal.org packaging whitelist.

Here is the current whitelist rules for plupload on drupal.org https://drupal.org/node/1404088

So I would recommend using https://github.com/moxiecode/plupload/archive/v1.5.8.zip instead.

Hope that explains it better

slashrsm’s picture

Issue summary: View changes

Gotcha. Updated. Thanks.

Also... it looks that there are problems with version string in 1.5.8. There is a patch that tries to fix that: #2171575: Plupload library not found (version 1.5.8) .

sheldonkreger’s picture

There is a browser specific bug (Chrome) which is fixed in 2.x of Plupload, but not in 1.x. Many file extensions are not available in the popup window where the user browses their local file system. See:

https://github.com/moxiecode/plupload/issues/526

I could spend some time working on building support for 2.x in this module, but I would like to have a clear roadmap before starting. Is anybody else interested in working on this? Or, is it a complete nightmare?

loze’s picture

this patch gets pluopload working with the latest version 2.1.1
Is a very minimal patch, so I could be missing something. But this seems to be working for me on my localhost.

loze’s picture

Title: plupload version introduces incompatibilities » compatible with latest plupload version (2.1.1)
Status: Active » Needs review
Issue tags: +make
loze’s picture

Title: compatible with latest plupload version (2.1.1) » Make compatible with latest plupload version (2.1.1)
Issue tags: -make
loze’s picture

this new patch finds the correct version number in _plupload_requirements_version()

  • Commit 2a450b7 on 7.x-1.x, 8.x-1.x by slashrsm:
    Issue #2098555 by slashrsm: Document library v2.0.0 incompatibility.
    
  • Commit 79136ca on 7.x-1.x, 8.x-1.x by slashrsm:
    Issue #2098555 by slashrsm: Suggest using .zip instead of .tar.gz.
    
ofry’s picture

Can you port this patch to 7.x-2.x-dev?

slashrsm’s picture

Status: Needs review » Needs work
FileSize
1.94 KB

Thanks!

This works for HTML5 runtime, but fails with Flash (and possibly Silverlight - was unable to test it). I tried to point to the correct runtime files, but it didn't help.

We can commit this to 7.x-2.x if we make it work with all runtimes.

sheldonkreger’s picture

slashrsm -

Thanks for the patch. How are you testing the Silverlight and Flash issues? I'd like to help out.

slashrsm’s picture

@sheldonkreger: You look for "runtimes" part of plupload_library() (currently 'html5,flash,html4'). Change this to "flash" or "silverlight" and test. Making flash work is more important than silverlight.

sheldonkreger’s picture

Awesome, thanks slashrsm!

Under what circumstances would a developer want to use something other than HTML5? Is Flash needed for legacy browser support or something?

Fidelix’s picture

Under what circumstances would a developer want to use something other than HTML5? Is Flash needed for legacy browser support or something?

Yes. That's the whole point of plupload. It supports multiple runtimes as fallbacks.

casey_2000’s picture

Hi friends.

How much will it cost to make full support for plupload2 in this module ?

Full support I mean to have thumbinals, clientside resize etc.

I could try to sponsor this upgrade if it's not too much.

If anyone is interested, you can answer this comment or email me mail@internet-rostova.ru

Anonymous’s picture

subscribe

monaw’s picture

What's the status on the Plupload 2.1.x integration?

toamit’s picture

Update to current plupload library will be very useful indeed. Vote ++

botris’s picture

Tested #15 against dev.

Chrome: both HTML5 & Flash work!
Safari: HTML5 works, Flash I can add files but when I upload I get error icons. Watchdog says:
access denied - http://mysite.dev/plupload-handle-uploads?plupload_token=qfex4Risxe6cBwC...

Which seems strange as it works in Chrome.
With Silverlight I get an error about wrong file extension, but I get that on the official website as well. My Silverlight version is probably very old.

But the tests seem pretty ok.

Last thing though, i18n.js does not exist. So this could go:

  if (module_exists('locale')) {
    $module_path = drupal_get_path('module', 'plupload');
    $libraries['plupload']['js'][$module_path . '/js/i18n.js'] = array('scope' => 'footer');
  }
sonicthoughts’s picture

Issue summary: View changes

2.x has substantial changes but they are clearly improving stability with unit testing. chrome #15 works - no testing beyond.

evilehk’s picture

Title: Make compatible with latest plupload version (2.1.1) » Make compatible with plupload version 2.1.8
Status: Needs work » Needs review
FileSize
4.42 KB
226.24 KB
231.3 KB

Currently the latest version of plupload is 2.1.8. I've updated the title accordingly. Attached is the patch I used for compatibility v2.1.8 of the plupload library with this awesome module! Screenshots are from Browserstack to show plupload working with flash and silverlight.

slashrsm’s picture

Thank you!

I currently don't have time to properly test and review this but I will be more than happy to commit if somebody else does that.

rwilson0429’s picture

FileSize
115.33 KB

I couldn't the patch in #15 or #26 to work for me using plupload version 2.1.8. Both patches apply successfully but, when I go to admin/content/file/bulk_upload, the interface to upload the files does not show up.

  • I downloaded the latest dev version (7.x-2.x-dev 2015-Mar-19)
  • downloaded plupload ver 2.18 into sites/all/library folder and named the folder plupload
  • Applied the patch in #26 successfully
  • it didn't work, see screenshot.

screenshot

budalokko’s picture

I did some tests with Patch in #26 and all worked for me:

  • Library version was correctly detected.
  • Drush make downloaded the library and removed the "examples" folder.
  • HTML5 upload (all browsers).
  • Flash upload (all browsers except FF).
  • Silverlight upload (only IE).
  • Code and Readme changes look good.

All tests were done using the Media Bulk Upload functionality provided at file/add, with browsers:

  • FF (Linux + Windows)
  • IE11
  • Latest Chrome

I think Flash not working for me on Firefox is due to my setup, not to the module.

It would be great somebody else testing in a different setup.

@rwilson0429:
I also did a fast test with the bulk_media_upload module you use and it worked. Maybe there is something on your setup that makes it break. Media version? Jquery update?
Also I guess sites/all/library was just a typo and you meant sites/all/libraries.

kyberman’s picture

Tested patch from #26 with current dev + FF (html5 runtime) and it works well, thanks. But I had to remove plupload.make from diff, because this file doesn't exist in the basic installation.

I tried file/add form and also field with Media Browser widget (bulk upload).

budalokko’s picture

@kyberman:
Regarding the plupload.make issue, maybe you tried to apply the patch to 7.x-1.x which hasn't that file.
The patch is supposed to be applied to 7.x-2.x.

philosurfer’s picture

I am going to be a Drupal Nazi here and point out that the above listed patches do not follow Drupal guidelines outlined
https://www.drupal.org/node/707484

Please make sure you are properly naming your patches. Specifically in the following format:
[project_name]-[short-description]-[issue-number]-[comment-number]-[drupal-version].patch

That being said, the patch on #26 works in Safari and chrome with:
plupload-7.x-2.x-dev
and
plupload JS 2.1.8

Please consider this patch for release candidate as it solves the need for 2.x compatibility of the Plupload library.

Cheers!

slashrsm’s picture

Status: Needs review » Needs work
+++ b/plupload.install
@@ -88,7 +88,7 @@ function _plupload_requirements_installed() {
+  $jspath = $library_path . '/js/plupload.dev.js';

This looks strange.

BTMash’s picture

Should it be referencing plupload.min.js or plupload.full.min.js?

evilehk’s picture

Thanks for the patch standards link, @philosurfer. I use the patchname suggestion button when creating patch names but I'm all for following standards.

The reference to plupload.dev.js is in the install file and used to find the plupload version when the module is installed or on the Status report page. Still, there's no reason not to use the minified version. The new patch references plupload.min.js instead of plupload.dev.js. Interdiff included.

evilehk’s picture

Status: Needs work » Needs review
BTMash’s picture

Component: Documentation » Code
Status: Needs review » Needs work
+++ b/plupload.install
@@ -88,7 +88,7 @@ function _plupload_requirements_installed() {
+  $jspath = $library_path . '/js/plupload.min.js';

Minor: This should be plupload.full.min.js to be in line with the README and what is loaded via hook_library().

Once that fix is in, looks great!

I change the issue to code since this does concern updated module requirements (and documentation happens to be a part of it).

On my sidenote and totally unrelated to the issue: Regarding the path filename format, I was never a fan of [project_name]-[short-description]-[issue-number]-[comment-number]-[drupal-version]. The issue number to me is the important bit and the link provides all the necessary context. So that should come first (and the rest helpful but optional). But whatever, gripe over. Patch is great but requires atleast one small change.

dzy’s picture

#35 working great!

NWOM’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev

I had a lot of problems attempting to apply this to 7.x-1.x-dev, but after reading through the issue queue, it appears the patch is meant for 7.x-2.x-dev. Setting to 7.x-2.x-dev to help others that are applying the patch. Please revert the version back, if I am mistaken.

NWOM’s picture

Here is an updated patch containing the minor fix detailed at #37. Please review.

The patch was also created using drush_iq, so sadly don't have the ability to change the patch filename structure.

NWOM’s picture

Status: Needs work » Needs review
NWOM’s picture

Here is another patch updating the patch to include the v2.1.9 details rather than v2.1.8

NWOM’s picture

I forgot one v2.1.9 string. Please review.

jimmyko’s picture

I need the thumbnails view and dragging feature which only available on the new widget. But I can't find this feature in all above patches.

Therefore, on top of the existing patch, I have made below changes:

1. A new attribute and logic for user choosing the widget.
2. A new class name on the plupload wrapper for different widget.
3. New styles applied on the jQuery UI widget.
4. A new menu item for demo.

I didn't notice that there is 7.x-2.x-dev, so all these changes are based on 7.x-1.x. I will make a patch for 7.x-2.x-dev later.

jimmyko’s picture

Title: Make compatible with plupload version 2.1.8 » Make compatible with plupload version 2.1.9

Update the library version on title.

budalokko’s picture

@jimmyko: Your changes look promising but it would be better to take care of them on a separate issue.

jimmyko’s picture

@budalokko

Thanks for your review. I agree it is better to have a new issue for new feature. But it heavily depends on the integration of the new version of library, so I put the patch here for further discussion.

NWOM’s picture

@jimmyko You could create a new issue with that new issue being configured here as a child issue. That way, until this patch gets commited, it is linked and can be set to "postponed" as an example.

Adding additional features to this, will probably only delay committing it to the module. Also this module already has the drag feature working when combined with the Filefield Sources Plupload module as an example.

jimmyko’s picture

@NWOM No worry. I have created a new issue.

NWOM’s picture

Thanks jimmyko. Here is a re-attached patch from #43. Please review.

jimmyko’s picture

Status: Needs review » Reviewed & tested by the community

I reviewed the patch at #50 and confirm it is working fine in both my project and in simplytest.me

budalokko’s picture

Status: Reviewed & tested by the community » Needs work

Yes, it worked for me too, also with Flash runtime.

I'd commit patch in #40 but found a small thing we could arrange before commit:

On the README.txt file we are still displaying this defaults for '#plupload_settings':

    'flash_swf_url' => file_create_url($library_path . '/js/plupload.flash.swf'),
    'silverlight_xap_url' => file_create_url($library_path . '/js/plupload.silverlight.xap'),

These file URLs have changed.

NWOM’s picture

Why #40, when #43/#50 include the v2.1.9? Consistently throughout this thread the version has changed in this patch as they were released.

budalokko’s picture

I am sorry, it was an error.

I meant your last patch: #43/#50.

  • budalokko committed 16912b8 on 7.x-2.x authored by NWOM
    Issue #2098555 by NWOM, evilehk, loze, slashrsm, jimmyko:  Make...
budalokko’s picture

Status: Needs work » Fixed

Committed patch in #50 with a small correction to README.txt for the changed settings defaults.

NWOM’s picture

Sorry I must have missed your last comment. I'm not sure if I deserve "authored" status on that patch, since I more or less only updated a few lines. Regardless, thank you for committing it!

Status: Fixed » Closed (fixed)

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

Nil.Ned’s picture

Hey man #50 works perfectly ! great !!!

Anonymous’s picture

I tried patch #50 with he 7.x-1.7 version and make everthing exactly like in the new read me version .

I cleared caches and run update.php but I still get this message under:

Plupload library 1.5.3
Plupload 2.1.9 or higher is required.

NWOM’s picture

@drupkennedy, the patch was not for the 7.x-1.x branch (also not for the stable 7.x-1.7). The patch was meant for the 7.x-2.x branch. However, it has since been implemented in the newest 7.x-2.x dev. If you look at the top right of an issue, it'll tell you for what version a patch is meant for.

Also, in order to directly download from the repo (since the 7.x-2.x does not have a release on the download page), do the following:

  • On the Module page click on Version Control
  • Next to "Version to work from", choose the appropriate branch. (7.x-2.x), and hit Show.
  • Then using GIT, run the the two lines under "Setting up repository for the first time".
mikeohara’s picture

Any chance we can port this work to the 8.x version?

iseeaflyingcrane’s picture

hello, i have been trying a couple days to make the plupload 2 to work with drupal. I downloaded 7.x-2.x version of plupload module and 2.1.9 plupload. I was able to upload images but the images are just a name and displayed as a list view. I want to know how I can use the thumbnail view. when i built my plupload form, I added the following line in there. I thought this is going to make the thumbnail view work. but obviously not.

      'views' => array(
        'list' => 'true',
        'thumbs' => 'true', // Show thumbs
        'active' => 'thumbs',
      ),

I always got this list view. I couldn't get the thumbnail view

list view
Only local images are allowed.

below is my complete form build code. Can someone please point out what I am missing to use the thumbnail view? thanks a lot!

$form['my_element'] = array(
	  '#type' => 'plupload',
	  '#title' => t('Upload files'),
	  '#description' => t('This multi-upload widget uses Plupload library.'),
	  '#autoupload' => TRUE,
	  '#autosubmit' => TRUE,
	  '#submit_element' => '#id-of-your-submit-element',
	  '#upload_validators' => array(
	    'file_validate_extensions' => array('jpg jpeg gif png txt doc xls pdf ppt pps odt ods odp'),
	    'my_custom_file_validator' => array('some validation criteria'),
	  ),
	  '#plupload_settings' => array(
	    'runtimes' => 'html5',
	    'chunk_size' => '1mb',

      'views' => array(
        'list' => 'true',
        'thumbs' => 'true', // Show thumbs
        'active' => 'thumbs',
      ),
 
	  ),

rimu made their first commit to this issue’s fork.

rimu’s picture

#50 worked for me but first I needed to

remove all the lines before

diff --git a/README.txt b/README.txt

and create a file at sites/all/libraries/plupload/changelog.txt containing this text

Version 2.3.9 (2021-11-15)
	I downloaded it from https://github.com/moxiecode/plupload/releases