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.
I am running the leaflet module which must have been relatively recently updated to reflect the changed file structure of downloading the leaflet project. There is no 'dist' directory in leaflet anymore. All files are in the main leaflet folder. I was able to workaround this by also copying all files into a 'dist' directory within my leaflet library folder, I can submit a patch, but wanted to document in case anyone else runs into this particular error when trying out the module.
Comment | File | Size | Author |
---|---|---|---|
#2 | 2122275.patch | 631 bytes | balagan |
Comments
Comment #1
balagan CreditAttribution: balagan commentedPatches are always welcome! :)
Comment #2
balagan CreditAttribution: balagan commentedComment #3
pcambraThe patch successfully solves the problem.
Comment #4
boabjohn CreditAttribution: boabjohn commentedHi guys,
I think there needs to be a bit more extension on this patch to accomodate leaflet.draw
We are seeing maps, but no drawing tools.
The console errors are:
The requested URL "/lib/Leaflet.draw/leaflet.draw-src.js?v=1.x" was not found on this server
followed by:
The requested URL "/dist/Leaflet.widget.js?v=1.x" was not found on this server.
We have the leaflet widget library installed at sites/all/libraries/leaflet.widget/..
in this directory is
grunt.js
/dist/
etc...
Any pointers much appreciated.
Comment #5
boabjohn CreditAttribution: boabjohn commentedSorry to confuse things...I just peeked at the patch and realised that it's pointing toward:
leaflet_widget/lib/Leaflet/
I've renamed our directory from leaflet.widget to leaflet_widget
We do get a map displayed, but the errors for locating leaflet.draw and Leaflet.widget (noted above) are still showing up in the firebug console...and we have no draw tools.
It seems like the Drupal Leaflet module is finding the main leaflet library, but the leaflet_widget module is not finding its library, and that's where leaflet.draw is located.
Clues or pointers?
Comment #6
boabjohn CreditAttribution: boabjohn commentedLast ditch attempt:
I copied the contents of tnightingale's leaflet.widget into /leaflet, so we now we have these physical paths:
However, the module still fails to find the leaflet.draw library (as above):
The requested URL "/lib/Leaflet.draw/leaflet.draw-src.js?v=1.x" was not found on this server
We are trying to get a symbolic link set up to point /lib/ to one of the locations above but:
a: I haven't figured out how to push a symbolic link in Pantheon and
b: this is a really messy approach: surely there's a better way to patch the leaflet_widget module so that it can locate the libraries it needs?
Any assistance really appreciated!