If I visit admin/build/openlayers/layers/add a watchdog message " Layer add not found." is created.
If I visit admin/build/openlayers/layers/import a watchdog message "Layer import not found." is created.
If I visit admin/build/openlayers/layers/settings a watchdog message "Layer settings not found." is created.

It looks like the module is looking for a layer named like the final argument on URL.

This is a new installation of the module. I have not defined any layers, maps, presets, related views, etc.

Comments

toomanypets’s picture

Here's the watchdog call in openlayers.module:

function openlayers_layer_load($name, $reset = FALSE) {
  ctools_include('export');
  if ($reset) ctools_export_load_object_reset('openlayers_layers');
  $layer = ctools_export_load_object('openlayers_layers', 'names', array($name));
  if ($layer) {
    $layer_object = openlayers_get_layer_object($layer[$name]);
    if (openlayers_layer_sanity_check($layer_object)) {
      return $layer_object;
    }
  }
  else {
    watchdog('openlayers', 'Layer %layer not found.',
      array('%layer' => $name), WATCHDOG_ERROR);
    return FALSE;
  }
}
toomanypets’s picture

Category: support » bug

Changing category to bug report.

zzolo’s picture

I can confirm this.

My initial thought was this was caused by using menu loaders, but these pages do not have them. So, that function must be called somewhere else?

zzolo’s picture

Version: 6.x-2.0-alpha8 » 6.x-2.x-dev
strk’s picture

confirm the bug, annoying and expensive.

strk’s picture

Also from:

admin/build/openlayers/presets
admin/build/openlayers/presets

In the case above xxx is the empty string: 'layer not found'

The watchdog comes always twice.

If you enter in an 'edit', you get the xxx set to the name (of whatever it is: style, preset, layer).

strk’s picture

For some reason the $router_item has path admin/build/openlayers/layers/%/edit

Sounds like a bug in router OR (more likely) our menu items definitions

strk’s picture

Assigned: Unassigned » strk
Status: Active » Fixed

Committed a fix: http://drupal.org/cvs?commit=432172

Please cvs up and try again.

I changed type of layer/edit path from MENU_LOCAL_TASK to MENU_NORMAL_ITEM, matching other layer actions (export/delete), and drops the then useless tab_parent.

The interface can probably be cleaned up more, for all layer actions (which currently loose the context menu on top).
But this should be argument of another issue.

toomanypets’s picture

Applied the simple change, cleared all caches, tested -- looks good! Thanks!

teckcrew1’s picture

I am getting the same error. Using Open layers: 6.x-2.0-alpha10

I have gone through the tutorial and everything has been done correctly as far as I can tell for Zoom To Layer.

My "Views to Layer" is also not working. Would this issue affect the Zoom To Layer functionality?

tmcw’s picture

Status: Fixed » Closed (fixed)

teckcrew: first off, this fix was made since alpha10, so the commit in #8 is in -dev, not alpha10. But, besides that, open a new ticket because your problems are unrelated.

teckcrew1’s picture

Thanks for the info tmcw.