I'm working with the Example Use. I added three Locator nodes, giving each a Title, some text in the Body, country of United States, a City, and an American state. No Address1, Address2 or ZIP code.

I clicked on the Locator menu item. This resulted in the error:

Exception: Projection 900913 lacks an authority code. Read http://drupal.org/node/1944074 for hints. in openlayers_get_projection_by_identifier() (line 977 of C:\wamp\www\openlayers\sites\all\modules\openlayers\openlayers.module).

Looking at openlayers.module, the code reads:

function openlayers_get_projection_by_identifier($identifier) {

  $records = ctools_export_load_object('openlayers_projections', 'names', array($identifier));

  if (empty($records)) {
    if(mb_strpos($identifier, ':')===FALSE){
      throw new Exception(t("Projection !projection lacks an authority code. Read http://drupal.org/node/1944074 for hints.", array(
        '!projection' => $identifier
    throw new Exception(t("Projection !projection requested but not supported.", array(
      '!projection' => $identifier
  return openlayers_projection_from_record($records[key($records)]);

I haven't seen this code before today and I'm not sure yet why $records is empty.


nicoz’s picture

Status:Active» Closed (duplicate)

Sorry, this has absolutely nothing to do with the OpenLayers locator module. This is only a feature module that leverages the Openlayers suite of modules. See the following thread for a patch to fix. #1943968: Layer Projections defined without projection authority cause "Exception: Projection 900913 requested but not supported"

inkling’s picture

I think that's the fastest response I've ever had with a Drupal bug. Thanks. :-) Sorry about the duplicate report; I didn't see that when I went looking.

nicoz’s picture

No prob:).

If in your travels, you do discover that there is something that does need to be addressed in this module, let me know.

kingfisher64’s picture

I realise this is nothing to do directly with ol locator however I'm still getting this error when installing the feature. I've tried the latest dev version of the geofield mod dated yesterday which was meant to fix this.

Is it possible that the feature needs updating? I apologise in advance if this is not the case i'm just trying to hunt down what's going wrong.

http://mapping.kingfisher.so/locator shows the error

nicoz’s picture

As you can see by the openlayers locator project page that it is only compatible with the 1.x version of geofield. Therefore running the 2x or dev version is not going to work. The 2.x version is a major rewrite and departure from the 1.x. Until it is the recommended release I will only support the 1.x. See #1721370: Not compatible with Geofield 7.x-2.x-dev

kingfisher64’s picture

Hi Nicoz i'm using geofield 1.1 not the 2.x branch. I've tried 2 different versions of 1.x branch, 1.1 and dev both output the error. The dev from yesterday is mean't to include the relevant fix, but...

Do you have a working feature? If so is there any chance you could just zip it here for me to try. I spent half of yesterday going through threads reading up on this and I can't understand why this is behaving the way it is.

PS - thanks for the feature this was exactly what I'm after. Will try the manual way as described in http://drupal.stackexchange.com/questions/14659/need-a-simple-google-map... as well but I don't see why that would work and the feature not.

nicoz’s picture

Assigned:Unassigned» nicoz
Priority:Normal» Critical
Status:Closed (duplicate)» Active

I have now had a chance to dig deeper into this. It is indeed a bit of a mess. Openlayers introduced a change to projections #1943968: Layer Projections defined without projection authority cause "Exception: Projection 900913 requested but not supported", and while it seems to be a simple change, it obviously messes with ol_locator's default maps. I have committed a fix for this:


Please wait until a new dev snapshot is available on d.o. today and then download and flush your cache (also, ensure you are running the latest geofield 1.x dev).

I am going to have to play with this a bit more when I have some time. This fix will work for existing installations, but using geofield 1.x-dev makes ol_locator fail on install for new sites.

Please report any issues.

kingfisher64’s picture

No problems thanks for offering the help. I'll test it on my mapping test site posted in #4 so others can see it successfully working.

kingfisher64’s picture

The feature is now displaying. It outputs the following errors for quite a few cache clears, but then the error disappears.

Notice: Undefined property: stdClass::$field_ol_locator_geofield_geom in field_sql_storage_field_storage_load() (line 363 of modules/field/modules/field_sql_storage/field_sql_storage.module).

Notice: Undefined property: stdClass::$field_ol_locator_geofield_geohash in field_sql_storage_field_storage_load() (line 363 of modules/field/modules/field_sql_storage/field_sql_storage.module).

Mentioning this so others know that after quite a few cache clears the error does disappear.

timwood’s picture

I've just tried spinning up the latest ol_locator on simplytest.me selecting the "Branches > 7.x-1.x" version and I'm still getting the exception when trying to edit the ol_locator maps.

nicoz’s picture

Status:Active» Postponed (maintainer needs more info)

Did you flush your cache and even try reverting the feature?

nicoz’s picture

Ensure that you also have the 1.x-dev version of geofield running too.

timwood’s picture

Same thing when trying to use the 2.x branch.

nicoz’s picture

Using simplytest.me will download the latest stable version of geofield. You need to run the dev version to make this work.

nicoz’s picture

Issue summary:View changes
Status:Postponed (maintainer needs more info)» Closed (fixed)

Closing as this is no longer an issue in the 2.x. Reopen if you feel this is still an issue.