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.

CommentFileSizeAuthor
#2 2122275.patch631 bytesbalagan
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

balagan’s picture

Patches are always welcome! :)

balagan’s picture

Issue summary: View changes
FileSize
631 bytes
pcambra’s picture

Status: Active » Reviewed & tested by the community

The patch successfully solves the problem.

boabjohn’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +library

Hi 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.

boabjohn’s picture

Sorry 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?

boabjohn’s picture

Last ditch attempt:
I copied the contents of tnightingale's leaflet.widget into /leaflet, so we now we have these physical paths:

/sites/all/libraries/leaflet/lib/Leaflet.draw/leaflet.draw-src.js
/sites/all/libraries/leaflet_widget/lib/Leaflet.draw/leaflet.draw-src.js

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!