Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
hook_requirements is looking for dropzone.js not dropzone.min.js
hook_requirements is looking for dropzone.js not dropzone.min.js
Comments
Comment #2
DuneBLHere is a small patch...
Comment #3
DuneBLSorry, there is a typo in my small patch... Here is the correct ones.
Comment #4
Primsi CreditAttribution: Primsi at Examiner.com for Examiner.com commentedThanks for contributing. I agree that the minified version would be a better option. But wouldn't this patch throw requirement errors for users that already have the non-minified version? Ideally we should detect if the library is present, but I don't know if there is an elegant way of doing this. Maybe libraries_detect is a good place to get ideas.
Comment #5
DuneBLYes you are right... this should be the correct way to handle this issue...
As I don't have too much time to dig into this, here is a corrected version of the patch that check for the minimified version or the non-minimified version of the script.
Comment #6
j2r CreditAttribution: j2r at Srijan | A Material+ Company commentedI think the correct way is to check for a dropzone.min.js file only not dropzone.js as dropzonejs.libraries.yml file calls the min version and same is applied for dropzoneJsElementTest.php file.
Comment #7
Primsi CreditAttribution: Primsi at MD Systems GmbH commentedActually you're right, dropzonejs library includes the minified library and we should check for that one. Committing patch from #3. Thanks to all!
Comment #12
Primsi CreditAttribution: Primsi at MD Systems GmbH commentedTestbot trying to make up for not testing previous patches it seems.