Path location for download seems to be correct - but link goes to wrong versions of dropzone

Created on 7 December 2020, almost 4 years ago
Updated 15 March 2024, 7 months ago

Problem/Motivation

The instructions are incorrect - on drupal.org/project/dropzonejs they say:

Download DropzoneJS library and place it in the libraries folder (/libraries). You need the full library which is easily available from the Github repo (the full path to the required js file should be: /libraries/dropzone/dist/dropzone.js).

Steps to reproduce

I've done as above: my file and path is: web/libraries/dropzone/dist/dropzone.js

Where libraries is in web folder, on the same level as core: https://www.drupal.org/forum/support/post-installation/2016-04-11/where-... β†’

But when I run drush updb I get:

[error] Dropzonejs requires the dropzone.min.js library.
Download it (https://github.com/enyo/dropzone) and place it in the
libraries folder

That error refers to a different file name - dropzone.min.js - which is not the same name as dropzone.js on the drupal.org/project/dropzone project page.

I'm also aware of what appear to be related or similar issues, having done a quick search: https://www.drupal.org/project/issues/dropzonejs?text=Dropzonejs+require... β†’

But on the basis that the drupal.org/project/dropzonejs page hasn't been updated yet, I'm assuming the outcome of raising these issues is still ongoing or hasn't addressed that, so I wanted to raise this issue.

Proposed resolution

3 things please:

1) Correct the drupal.org/project/dropzonejs instructions to use this path, as mentioned in modules/contrib/dropzonejs/dropzonejs.install at line 21 and 24 (for version 2.3)

The correct path is: web/libraries/dropzone/dist/min/dropzone.min.js

Where web is the folder directory that core, modules, sites etc also reside in at same level as described above.

Confirming this is correct, because when I now run drush updb with this, I don't get the error.

2) make error message in web/modules/contrib/dropzonejs/dropzonejs.install at lines 43-50 for version 2.3 more user friendly, i.e. to actually show the full path and filename in the message.

3) Decide on whether - either:
A) users of this module need to manually install the dropzone.js (dropzone.min.js) library
OR
B) this is managed automatically by the module, i.e. via a local composer or the js stored with the module as its own local library

and then update all documentation as required.

Remaining tasks

For assignee of this issue to determine.

User interface changes

None.

API changes

None.

Data model changes

None.

Thank you.

πŸ› Bug report
Status

Closed: duplicate

Version

2.0

Component

Documentation

Created by

πŸ‡¬πŸ‡§United Kingdom therobyouknow

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡©πŸ‡ͺGermany thomaswalther Rhein-Main Area

    I made a Drupal 10 new system with composer (create-project \
    drupal/recommended-project:10.1.1) and drush.

    I try to require with composer:

    • wikimedia/composer-merge-plugin
    • oomphinc/composer-installers-extender
    • drupal/dropzonejs enyo/dropzone

    I got errors on enabling:

    [error] Unable to install module 'dropzonejs' due to unmet requirement(s):
    - Dropzonejs requires the dropzone.min.js library.
    Download it (https://github.com/enyo/dropzone) and place it in the
    libraries folder (/libraries)

    So I have no folder like /libraries in my webroot.

  • πŸ‡ΊπŸ‡ΈUnited States nkraft

    omg, how is this still a problem? My dev team requires that we handle ALL libraries through Composer, rather than manually tracking files in the "libraries" folder.

    The module is still upset that I don't have "dropzone.min.js" -- even though I followed tthe project page instructions exactly, AND I DO have dropzone.js (no MIN) in my libraries folder.

    This seems like it should have been updated or patched appropriately by now. Am I missing instructions somewhere? Or can I safely abandon this module finally?

  • πŸ‡ΊπŸ‡ΈUnited States slippast

    @nkraft

    I came here from a Google search thinking the same thing. How is this not solved?

    Check the new install instructions on the module's home page. You'll find instructions that explain how to move the dropzonejs library to Composer. They weren't a perfect fit for me since I already have other libraries added via the 'repositories' key. I used this structure in my composer.json file:

            "dropzonejs": {
                "type": "package",
                "package": {
                    "name": "enyo/dropzone",
                    "version": "5.7.1",
                    "type": "drupal-library",
                    "dist": {
                        "url": "https://github.com/enyo/dropzone/archive/v5.7.1.zip",
                        "type": "zip"
                    }
                }
            },
    

    I then ran this command per instructions: composer require drupal/dropzonejs enyo/dropzone and the error is gone from the status page.

  • πŸ‡¨πŸ‡¦Canada RobLoach Earth
  • Status changed to Closed: duplicate 7 months ago
  • πŸ‡¨πŸ‡­Switzerland berdir Switzerland

    The install instructions were updated in πŸ“Œ Installation not working with Dropzone 6 Needs review and support the most recent versions and various file locations now. Not tools though, but you should download dist.zip as the instructions now state.

  • πŸ‡¬πŸ‡§United Kingdom therobyouknow

    This is perhaps a great example for using import maps.

    What exactly is an import map?

    Answer:

    This can be used to allow JS imports without having to specify the full path to the JS file.

    - From: https://www.drupal.org/project/importmap β†’

    Import maps are available in Javascript and aren't a Drupal-specific concept; Javascript projects in general can use them.

    Modules:

    https://www.drupal.org/project/importmap β†’ (aforementioned)
    https://www.drupal.org/project/importmaps β†’

    https://www.drupal.org/project/dropzonejs/issues/3295283#comment-15492496 πŸ“Œ Installation not working with Dropzone 6 Needs review

Production build 0.71.5 2024