On every node I have Geofield Map with location which is displayed with Open Layers and webform with clientside validation.
In Internet Explorer versions below 9 (I tried 6,7 and 8) map is not displayed, and it's not in the code either. On page which doesn't have webform map is displayed ok.

When I turn of Clientside Validation Webform everything is ok.

This is the piece of source code from IE7:

<div style="width: auto; height: 400px;" id="openlayers-container-openlayers-map-90168b53" class="openlayers-container openlayers-container-map-plan_geofield_formatter_map">
  <div style="width: auto; height: 400px;" id="openlayers-map-90168b53" class="openlayers-map openlayers-map-plan_geofield_formatter_map"></div>
</div>
<form class="webform-client-form" enctype="multipart/form-data"......>

Is there some kind of solution, because I would like to continue to use Clientside Validation module.

Comments

attiks’s picture

Do you get any javascript errors?

drago239’s picture

No, nothing.

attiks’s picture

Problem confirmed, I get LOG: TypeError: Object doesn't support property or method 'getResolution' on pages where both clientside_validation and open layers are used, but no idea why this is happening.

Clientside_validation is loading clientside_validation.ie8.js to support function not native supported by IE9-, I assume openlayers is doing something similar and hence the problem.

Can you try commenting out (or removing) the following inside clientside_validation.ie8.js:

if(!String.prototype.trim) {
  String.prototype.trim = function () {
    return this.replace(/^\s+|\s+$/g,'');
  };
}
drago239’s picture

No, still not working. But there somewhere is the problem. I removed clientside_validation.ie8.js and both map and clientside validation webform is working.

attiks’s picture

Version: 7.x-1.34 » 7.x-1.x-dev

For me it was working without the trim function (which isn't used anymore), the problem is we need the other functions to provide support for IE9-

Are you sure the clientside_validation.ie8.js wasn't cached by your browser?
Can you try commenting out each function separately, to which one is causing the problem?

PS: Try the dev version while doing this.

drago239’s picture

Same thing with dev version, too. I cleared cache in drupal, in ie couple times, to be sure, and same thing. As soon as I remove clientside_validation.ie8.js, map and validation works.

attiks’s picture

Can you try commenting out each function separately?

chris_h’s picture

I was getting the same error with an Openlayers map using an exposed filter in IE<9. Disabling Clientside Validation (form module) fixed the error.

drago239’s picture

I tried commenting out each function separately and still no results.

attiks’s picture