Hi, I've found that the OpenLayers js wont be loaded if the variant set to 'Original'.

This is because you did not specified the 'original' variant in the openlayers_libraries_info() function.

So my suggested solution is to set the variant to NULL in openlayers_include() function, if the variant is set to 'original', and this way the default js file will be loaded just fine.

CommentFileSizeAuthor
#1 openlayers-variant-fix-2372475-1.patch672 bytesyce
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

yce’s picture

The patch.

yce’s picture

To reproduce the problem:

  1. Fresh Drupal 7 install
  2. drush en openlayers openlayers_ui -y
  3. drush dl-openlayers
  4. drush cc all (just in case)
  5. Go to admin/structure/openlayers page
  6. Set source type to 'Internal'
  7. Set variant to 'Original'
  8. Click Save configuration

And you will get an error with the following 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.'

Status: Needs review » Needs work

The last submitted patch, 1: openlayers-variant-fix-2372475-1.patch, failed testing.

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 1: openlayers-variant-fix-2372475-1.patch, failed testing.

Pol’s picture

Status: Needs work » Fixed

It's fixed in the dev version already.

jaxxed’s picture

can you point me to the git version that fixed the problem? I would like to include it in a drush make, but it is too dangerous to point to 2.x-dev

FeyP’s picture

Either apply issue 2191887, patch #19 and issue 2360883, patch #1 on top of beta11 or use http://cgit.drupalcode.org/openlayers/commit/?id=01a08f0ada6f6597df60850...

tassoman’s picture

This patch helps. It avoids brokenness of the map rendering, also -__-

Pol’s picture

Could you test development version and tell me if this is fixed ? If yes, I'll make a new beta. Thanks !

tassoman’s picture

after: drush dl openlayers --select

7.x-2.x-dev - 2014-Nov-20 - Development

it works! Thanks Pol! :)

PS: please keep beta as stable possible as you can because of public websites :\

Status: Fixed » Closed (fixed)

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