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.
This is a small comment, I noticed while reading the code.
coffee.js is not a well closed library - but it is a simple fix.
Looking at the function definition defining the library
(function ($, Drupal, drupalSettings, DrupalCoffee) {
4 inputs but DrupalCoffee is missing from the 3 variables passed in at the bottom.
It is a small thing but DrupalCoffee inside the library is pulled from the global state!
Comment | File | Size | Author |
---|---|---|---|
params-0.patch | 306 bytes | martin107 | |
Comments
Comment #3
michaelmol CreditAttribution: michaelmol commentedThanks, i have commited your patch.
Comment #5
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot commented- Still we do have this:
Comment #6
martin107 CreditAttribution: martin107 commentedSo this patch is a little old, perhaps we should revert.
Here is the logical contradiction
DrupalCoffee is passed into coffee.js as a dependency
DrupalCoffee is defined inside coffee.js
The next logical step is to define DrupalCoffee in a separate file and then specify the new library dependencies correctly
Comment #7
mattjones86Yeah currently the module throws a javascript exception due to DrupalCoffee not being defined in the global scope. This makes the module unusable in it's current state.
Perhaps that patch should be removed again until DrupalCoffee is split out into it's own file?
Comment #8
martin107 CreditAttribution: martin107 commentedJust bumping to critical ... it is a pity I can't get reopen the status of this issue.
Comment #9
michaelmol CreditAttribution: michaelmol commentedComment #11
willzyx CreditAttribution: willzyx commentedReverted the patch
Comment #12
willzyx CreditAttribution: willzyx commentedComment #13
martin107 CreditAttribution: martin107 commentedThanks for reverting
I think this should be closed in favor of
#2839064: Separate DrupalCoffee into a new file.