When I try to use OpenLayers.js version 2.12 or 2.13 I get the following error after the javascript check:

'Could not find a valid library with a Javascript client-side check; Value found: 0. Please visit the OpenLayers settings page for more details.'

Version 2.11 is detected just fine.

Please advise.

#22 openlayers-original-not-detected.png35.25 KBboabjohn


jc_sed8d’s picture

Just bumping this - can anyone help? I'm really missing the 2.12 functionality. To confirm: 2.12 was working and now returns the above message. 2.13 has never worked.

dpw’s picture

I was having a similar issue where openlayers couldn't find my client-side library. My situation might be a little different, but essentially, I didn't have a folder (in my case a symlink) called "openlayers" in the sites/all/libraries folder. I had "OpenLayers-2.12" for example, and the openlayers module wasn't finding it.

jc_sed8d’s picture

I have nothing relating to openlayers in my libraries folder, I have been using external source (not the best way to do things I know).

If I put the openlayers 2.11 library in the libraries folder under /libraries/OpenLayers/* then the client-side check never completes.

eljakeo’s picture

I just downloaded OpenLayers for the first time, and am receiving the same error message when I try to use OpenLayers 2.12 or 2.13. I'm not having any luck with 2.12 either.

miaumiaume’s picture

try to rename the folder in "openlayers" and check if all relevant subfolders are inside.

jc_sed8d’s picture

I'm trying to use the external source though. I don't need a library folder in that case, right?

miaumiaume’s picture

Yes. You don't need the internal library at external source.
My post#5 was related to the internal mode.

dstay’s picture

version 7.x.2.0 beta 7. Installed internal version 2.12 via drush. Got the error. Changed to internal and 2.12, 2.13 = no luck. External 2.11 seems to be happy. Something's not making the connection.

jc_sed8d’s picture

Issue summary:View changes

Any progress on this? It has been months now.

I'm using:
Openlayers 7.x-2.0-beta7
Proj4JS 7.x-1.2
Libraries 7.x-2.2
Geofield 7.x-2.1
Openlayers Proximity 7.x-2.x-dev

FYI: I realised clientside check never completed for internal source because I had js aggregated. However, that doesn't resolve the fact that 2.12 and 2.13 fail with result 0.

Edit: when I try mobile, light, or any of the debugs, it detects 2.12 and 2.13 with no issue. I have the exact same experience with another website in a subfolder on my hosting. I'm hosting with GoDaddy.

mustardman’s picture

I'm having this problem with 2.0 beta 9. Tried all the versions down to beta 1 with same problem.

dhmichael’s picture

I have the same problem with 7.x-2.0-beta9. Is there any one a solution?

DSquaredB’s picture

I had this same issue with 7.x-2.0-beta9. I downloaded the OpenLayers library again with Drush as recommended and the error message is gone and it recognizes the library.

mustardman’s picture

I found that the update altered my views fields by enabling some labels that were previously disabled. When I disabled the labels in my openlayers view that had been enabled by the update that fixed a javascript issue for me.

Pol’s picture

Status:Active» Fixed


Indeed, quite a lot of changes has been happening in the openlayers_views module, a better handling and rendering of the fields.
You can now have all the goodness of Views fields rewriting in your popups ;-)
Don't forget to disable the labels of course if you want to, and also, in the settings of the OpenLayers Vector Data Overlay, you can select which fields to render be enabling them with a checkbox, this can reduce considerably the size of a page for your visitors and fasten the website.

I will close this for now, feel free to reopen if needed.

Status:Fixed» Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

jc_sed8d’s picture

Only just had a chance to catch up on this.

@Pol Many thanks for all your hard work on OpenLayers - my websites wouldn't be the same without it. However, I'm not really sure what you are proposing I do to fix the issue I raised originally? People have proposed various fixes, none of which have worked for me. I have even tried turning labels off as per comment #13, and that hasn't helped. I'm now on beta9.


jc_sed8d’s picture

Version:7.x-2.0-beta7» 7.x-2.0-beta9
Status:Closed (fixed)» Active
jantoine’s picture

I was having similar issues until I realized there are different types of downloads, a repository download which is missing required files and a release download with contains additional files that get built when the release is created. See my answer here: https://www.drupal.org/node/2233591#comment-9151119.

Hope that helps you resolve your issue, and if so, please mark this issue as fixed.

jc_sed8d’s picture

Hi @jantoine thanks for the tip. However I tried that and it still doesn't work. Just to be clear, this isn't an internal/external issue. It seems to be a version issue. 2.11 works fine both internal and external. 2.12 works internal on one of my sites, 2.13 doesn't work on both.

Testing external to keep user error to a minimum:

http://cdnjs.cloudflare.com/ajax/libs/openlayers/2.11/OpenLayers.js works and detects version 2.11
http://cdnjs.cloudflare.com/ajax/libs/openlayers/2.12/OpenLayers.js doesn't work and returns the 0 error.

http://cdnjs.cloudflare.com/ajax/libs/openlayers/2.12/OpenLayers.js works fine on my local WAMP dev site.

jc_sed8d’s picture

Status:Active» Closed (works as designed)
Issue tags:+Cloudflare, +openlayers

Finally got to the bottom of this (sort of).

I use Cloudflare to improve the performance of my website, and a new beta feature called Rocket Loader (Web Optimization) was affecting javascript. Can't claim to understand it in any detail, but it is a technique to automatically asynchronously load all js resources. In addition to the client-side check not working in OpenLayers, it also broke my progress bars *sometimes*, so I didn't put the two and two together until today. Due to the aggressive caching Cloudflare does, it seems the 2.11 check result was cached, but 2.12 and 2.13 results were not, and therefore failing.

Disabled the Rocket Loader and the client-side check completes for external sources. Internal sources still not working, but I need to check my library installation, since I played with it while trying to fix this. Either way, not an OpenLayers issue so closing, but might be useful to someone else with a similar issue in future. Aside from this, Cloudflare comes highly recommended!

Exploratus’s picture

Same problem. Can use all of the debug, light mobile, except the regular release. 2.13

boabjohn’s picture

new35.25 KB

Hi guys,

Thanks Pol for staying with this issue: seems like a simple configuration thing that is actually really important as it stops people cold if they can't get it to register the local library. We are having the issue of:
(local) original=fails
(local) original-debug=succeeds
(external) library=succeeds

I saw some of your other posts where you used drush libraries-list, and that was revealing.

We have OL 7.x-2.0-beta11 and use drush dl-openlayers.
The library shows up as expected at ../libraries/openlayers/*, and there is indeed a file there called OpenLayers.js << this equates to the "Original" as I understand.

However (see screenshot) when I run drush libraries-list, the openlayers section only reports: original debug, light, light debug, mobile, mobile debug

There is no "original" detected. Running drush cc all and drush cache-clear drush between drush dl-openlayers does not change things.

So....what next?

Thanks indeed!

jantoine’s picture


This should be fixed in the latest dev release. Please give it a try!

babinet’s picture

Hi all,
Same Here, it's accepting all versions when I select it to internal. Im running Cartaro.
Original debug
Light debug...

except the Original. Message:
"Could not find a valid library with a Javascript client-side check; Value found: 0. Please visit the OpenLayers settings page for more details."

ebenfarnworth’s picture

#23 changing to the latest dev worked for me.

alibama’s picture

I"m running the latest dev and have this issue... any other advice appreciated

davidneedham’s picture

Updating to the latest dev appears to fix this particular problem, however now I'm seeing another issue:

Key handler, class is missing in the definition of the behavior openlayers_behavior_geofield. The behavior will be disabled.

knalstaaf’s picture

@alibama: I was in the same struggle as well (having no access to drush currently). I finally got it to work using the 7.x-2.x dev-version (2015-Jan-11) of the module and the OpenLayers 2 v2.13 branch from GitHub (not the v2.13.1). I placed the latter in the Libraries directory so the path looks as follows: sites/all/libraries/openlayers/lib/OpenLayers.js

milos.kroulik’s picture

If I understand it right, it means, that recommended version doesn't work. Shouldn't there be an another beta version?