Posted by Admdebian on February 24, 2012 at 2:00pm
7 followers
| Project: | OpenLayers |
| Version: | 7.x-2.x-dev |
| Component: | OL Layers |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Apache error:
PHP Fatal error: Call to undefined method stdClass::save() in ./sites/all/modules/openlayers/modules/openlayers_ui/includes/openlayers_ui.layers.inc on line 58, referer: ./admin/structure/openlayers/layers/clone/world_openlayers_1
Comments
#1
Related issue but with D6 - #800546: Fatal error in openlayers ui
I can confirm getting this too with the dev version.
EDIT: Just looking at this a bit more. The error is coming in attempting to save the map
$success = $layer->save();- save is defined in the openlayers.module file as is openlayers_layer_type_load() which is called earlier.But what happens if
$layer = openlayers_layer_type_load($layer_class);returns false. Would that cause it not to load the object properly. If so then hopefully we'd just be able to do something like:
if (is_object($layer)) {$success = $layer->save();
}
But that's not working for me. This is the only instance in the OpenLayers module where I'm seeing an object using this function.
#2
I have the same problem - I simply can't add layers due to the error above.
#3
mgifford - just to confirm are you getting this with every attempt to create a layer?
I was able to create them on another site that I updated and now it doesn't work on there too so I'm wondering if its related to the update? Sounds like so...
Also - if this prevents creating layers entirely should it be marked as critical given that views layers are presumably what a huge number of people are using the module for? (Having said that I'm surprised there are not more reports of the bug!)
Thanks,
Adam
#4
There were some assumptions I didn't get from the docs & looking at the code I got from - http://drupalovereasy.com/drupal-7/tutorials/world-map-photo-album
Things like favouring Geofield over OpenLayers options.
Sorry I can't be more specific or be able to clearly replicate the problem.
EDIT: Are you using dev versions for geofields & openlayers?
#5
yes, I am
#6
Hi mgifford,
To replicate the problem:
Moving to critical as creating Views layers is a major use of this module and is now not working. I'm going to have to try the new GMap 7 port for now but will help if I can in testing as when views integration works, Open Layers is far superior.
Thanks,
Adam
#7
Its weird.. I just tried with an older version of Open Layers because as I say - it worked previously on another site that I had installed. However the alpha version has the same error. This suggests that the problems are due to an update in views or ctools maybe?
Very strange...
#8
I'm having the same issue, trying to create a new Openlayer_Views Vector layer. Full stack trace is in file attached.
#9
The issue here is more that you should not be allowed to clone Views based layers. I have update the UI to remove the clone button for these types of layers. You can clone them in the Views interface.
#10
Hi zzolo,
I'm not sure you got the issue totally - either that or I've misunderstood something but this is not just cloning - its creating too. If you go to the "add" page on the layers and try to add a views layer the thing crashes with the errors reported here - meaning there is absolutely no way currently using open layers to work with views.
I tried this on a fresh install with only the modules mentioned above (Layers/Views/CTools)
Re-opened, please let me know if I've missed something.
Thanks,
Adam
#11
Hi @adshill. Ah, yes, you should not be able to add a Views layerl manually through the OpenLayers UI. You should be creating them in Views.
#12
I have removed these options from the UI.