Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I used the drupal composer project and added the plupload module. I download the plupload lib and paste her in the library folder (web/libraries/plupload). The problem now is that plupload didn't found the plupload library. Are there any more steps nessesary to get plupload work?
Comment | File | Size | Author |
---|---|---|---|
#6 | plupload-adds-composer-json-2902645-6.patch | 960 bytes | budalokko |
Issue fork plupload-2902645
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:
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedAlmare created an issue. See original summary.
Comment #2
jeffschulerI added:
...to the "repositories" section of my composer.json file,
making sure you have an entry like:
...in the "extra" : "installer-paths" section of composer.json, specifying the appropriate libraries directory.
Then ran
composer require moxiecode/plupload
.I'm not sure if this is exactly the best way, but it worked. There's probably a simpler way to specify to get it from packagist (instead of github) but to still make it a "drupal-library" so it gets installed in the appropriate directory.
Comment #3
tormi@jeffschuler, according to readme:
Composer settings with 1.5.8:
and
composer require moxiecode/plupload:1.5.8
Comment #4
jeffschuler@tormi: That's the text from the project page, but that appears to not be true.
The 8.x README.txt says:
"1. Download it (version 2.1.1 or later) from..."
It looks like 2.x library compatibility was added in #2098555: Make compatible with plupload version 2.1.9.
Comment #5
tormiOk, good to know!
Comment #6
budalokko CreditAttribution: budalokko commentedAttached patch adds a composer.json to the module.
Based on previous comments, it tries to add correct moxiecode plupload dependency. Ideally people installing the module would find library is also installed.
But I have no idea how to test this without commiting it to the repo, so only leaving it here as a patch by now.
I will also try to contact slashrsm so the project page is updated to reflect D8 status.Project page was updated to reflect D8 status.
Comment #7
budalokko CreditAttribution: budalokko commentedComment #8
hepabolu CreditAttribution: hepabolu commentedI have applied the patch in #6 and the composer.json file was created, however the library was not downloaded automatically.
Comment #9
Kris77 CreditAttribution: Kris77 commentedI have the same issue too.
I have download module with composer, download library manually, but the module does not work...
Thanks.
EDIT: you must also download the module "Plupload_widget", but there are some issue.
Comment #10
Anonymous (not verified) CreditAttribution: Anonymous as a volunteer commentedcomposer require moxiecode/plupload
1) Should we update the module to reflect the vendor path, rather than be referencing the libraries folder path? Thus the libraries requirement would look for,
2) If we do go down this path then should we remove the examples folder from the /vendor/moxiecode/plupload/ folder via a post-package-install script?
Comment #11
marcoka CreditAttribution: marcoka commentedIt is not finding the lib at all: The Plupload library (version 2.1.9 or higher) is not installed.
I tried different versions above 2.1.9
My path is
/libraries/plupload/js/plupload.min
All files there. So not usable at all.
Comment #12
budalokko CreditAttribution: budalokko commented@marcoka: If you placed your library by copy paste and not via composer I don't think your problem is the same they are talking about here.
In case your Drupal install dir has a /web/index.php file library should be placed at /web/libraries/plupload (for example this file should exist: /web/libraries/plupload/js/plupload.min.js) . If
In case you don't have a /web directory there and you have tried with a 2.1.9, just "the file is there" but still it doesn't find it, most probably it is a permissions issue on those directories / files. Maybe extracted files are only accessible by owner and web server user is not able to read them. Some chmod should solve this.
Comment #13
budalokko CreditAttribution: budalokko commentedPlupload has been added to Packagist, this simplifies the task to make plupload a composer-friendly module. The problem is "vendor" directory is not always into webroot so it is not always available through the webserver. More info here #3002647: Add a vendor:// stream wrapper.
Surprises me this Vendor Stream Wrapper module hasn't higher usage statistics but it seems the way to go. I'll wait a while if somebody comes up with a better idea and adapt the patch to the new situation otherwise.
Comment #14
marcoka CreditAttribution: marcoka commentedYes thanks. I was a bit fast here because i installed a lot of libs for a lot of modules and the only one failed was plupload.
It is a permission thing here.
Comment #15
johnnydarkko CreditAttribution: johnnydarkko at Sage Tree Solutions commentedIn response to #6, update your `respositories` and `required` section of your root composer.json.
Example repositories section:
Then add
"moxiecode/plupload": "2.1.9",
to your required section.
HTH!
Comment #16
kellyimagined CreditAttribution: kellyimagined commentedHas anyone resolved this on Acquia Cloud? The issue is still there after following steps in #15.
Comment #17
budalokko CreditAttribution: budalokko commentedComment #18
budalokko CreditAttribution: budalokko commentedI've done some work in an attempt to make installation of plupload module, plupload library and the examples clearing patch a bit quicker in composer-based workflows.
Would be great to get some feedback before committing this.
The proposed solution is based on adding a
composer.libraries.json
file to the module and usewikimedia/composer-merge-plugin
andcweagans/composer-patches
in main composer.json so all gets installed correctly.So the instructions to test this would be the following. Step 1 won't be necessary once this is merged.
1. Instruct composer to use this issue's branch instead of default - The repositories section of your composer.json should end up with something like this:
2. Install cweagans/composer-patches and wikimedia/composer-merge-plugin
composer require cweagans/composer-patches wikimedia/composer-merge-plugin
3. Instruct merge plugin to use plupload composer.json. The "extra" section of composer.json should be like this:
When visitting /admin/reports/status no error messages should appear in the "plupload library" section and the plupload widget should be visible in forms, of course.
Comment #21
budalokko CreditAttribution: budalokko commentedCreated documentation on how to install plupload library via composer:
https://www.drupal.org/docs/extending-drupal/contributed-modules/contrib...
Updated readme with a reference to it.