There's a conflict between Shadowbox and OpenLayers. When the Shadowbox module is enabled the OpenLayers maps don't display in IE-browsers (7 and 8).

I posted the issue also in the issue queue for the openLayers module http://drupal.org/node/951210#comment-3744664

Comments

filburt’s picture

Version: 6.x-4.2 » 7.x-4.x-dev

Hi,

I figured out that unfortunately this problem isn't solved, yet. No maps are shown in IE7 and IE8

I'm using the latest versions of Openlayers and Shadowbox:

- Drupal 7.12
- Shadowbox 7.x-4.0-beta4+8-dev
- Openlayers 7.x-2.0-beta1+46-dev

IE7 Error: Error during map rendering: TypeError: 'geometry' is null or not an object

Any idea?

Thanks for support!
Filburt

garbo’s picture

Hi Filburt,

i solved this problem by using lightbox2 instead of shadowbox.

Cheers,
Bram.

manfer’s picture

Status: Active » Postponed (maintainer needs more info)

@filburt
I have tested and this is not happening for me.

I can't try every possibility on OpenLayers module to figure out what is happening in case it is still happening. I would need more info as OpenLayers seems a huge project that has lots of different configurations, so unless more info about the map that triggers the problem or a link to a site with the problem is provided I can't do anything.

The info you provide about the issue is nice but sadly not enough.

@garbo
Using lightbox2 is not a solution for an issue on shadowbox module.

garbo’s picture

@manfer, You're correct. Using Lightbox instead of Shadowbox is not a solution but a work-around. But sometimes when time is the limit work-arounds can help.

nclavaud’s picture

We've runned into the same issue using Drupal 7.14, Shadowbox 7.x-3.0-beta8 and OpenLayers 7.x-2.0-beta1.

This post for OpenLayers D6 helped us figure out the problem, especially comments #6 and #7.
http://drupal.org/node/734552#comment-2740816

In js/openlayers.js, around line 240, we should make sure that newFeature is an object, since shadowbox module is adding a function to the newFeatureSet array, as explained in the linked post.

I don't know if this is the best place to fix this issue, bug patching js/openlayers.js as shown below solved our problem.

Index: js/openlayers.js
===================================================================
--- js/openlayers.js	(révision 33929)
+++ js/openlayers.js	(copie de travail)
@@ -238,6 +238,10 @@
         // Go through new features
         for (var i in newFeatureSet) {
           var newFeature = newFeatureSet[i];
+          // @see http://drupal.org/node/734552#comment-2740816
+          if (typeof newFeature != "object") {
+            continue;
+          }
 
           // Transform the geometry if the 'projection' property is different from the map projection
           if (feature.projection) {
botris’s picture

Confirming #5 to work

bcobin’s picture

Wow. Thanks so much for this - saved my butt.

Will circle back here and post to OpenLayers if the issue hasn't been already - +1 to committing this to OL - thanks!

botris’s picture

Status: Postponed (maintainer needs more info) » Reviewed & tested by the community

Please commit

manfer’s picture

Project: Shadowbox » Openlayers
Version: 7.x-4.x-dev » 7.x-3.x-dev

Well, I don't think this is something that can be committed from openlayers module either as probably openlayers is a third party javascript library so most probable this is something that people have to apply manually themselves.

Anyway I'm going to send this back to openlayers so they decide if they can do a patch for this or not.

m.stenta’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Postponed (maintainer needs more info)

A lot of code has changed in the Openlayers module since this was last updated, so this may no longer be an issue. Please reopen and post a patch if it is. Thanks!