0

I have an strange problem with a library (leaflet).

I have some maps, and it works fine, but randomly (as far as I have been able to detect) drupal is unable to find leaflet.js and leaflet.css (it is allways located in sites/all/libraries/leaflet , as indicated in leaflet drupal module website).In fact I can see in Firebug that Drupal is not even trying to get the library (I get no server error message saying it cannot find the files or similar)

When this 'error' happens, I have to do strange things like moving the leaflet.js file to another folder or change the name and then, after drupal fails and I rename the file again, MAYBE drupal is able to find it again. Sometimes it seems like flushing cashes helps but not allways...I know it sound dummy but it only happens with this libarry and it seems completely random. Hours wasted trying to set up again...

The folder is 755 in permissions. Have tested in a different PC and the same problem! changing browser or clearing its cache doesn't help neither.

thanks in advance

0

How do you see that drupal does not find that files? Is it correct that you just get 404 for that files in browser? Try to load these files in browser window like http://yourdomain.com/sites/all/libraries/leaflet/leaflet.js. If it's not loaded, it's your server issue, rather than drupal one.

| improve this answer | |
  • As I said, sometimes it works (so, it finds the file, in consequence the path to file is good). I can see via Firebug how it is loaded. But, when it doesn't work, I can see in Firebug that Drupal is not even trying to get the library (I get no server error message saying it cannot find the files or similar) – user1249791 Nov 11 '14 at 8:04
  • Which way do you attach the library? Is it your custom code, or leaflet view, or leaflet formatter, or what? Also, did you check watchdog and php errors log? – Alex Bukach Nov 11 '14 at 12:56
  • thanks @Alex It's just attached via a leaflet View (so, no custom code, just had to install the module, the leaflet library and that's all). Using admin/reports/status i was able to see.. "The version of the Leaflet JavaScript Library library could not be detected" So I downloaded a newer version of Leaflet and it works now, again (really cannot understand why before worked randomly). I don't know till when but it works now :.) – user1249791 Nov 11 '14 at 13:45
  • @user1249791, congrats! :) – Alex Bukach Nov 11 '14 at 14:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.