[GeoNetwork-users] GeoNetwork 2.6.4 main.home display problems with IE6, IE7, and IE9

Dear list,

It's been pointed out to me that our GeoNetwork portal home page does not show the map and navigation content when viewed using IE 7, but does when using IE 8. I've checked using other variants of IE and can see the same problem in IE 6 and IE 9.

We are using GN 2.6.4.

I've applied the fix described in http://geonetwork.svn.sourceforge.net/viewvc/geonetwork/branches/2.6.x/web/src/main/webapp/xsl/header.xsl?r1=7798&r2=7797&pathrev=7798 to set the <meta http-equiv="X-UA-Compatible" content="IE=8"/> in my main html header so it appears in the page like:

<!DOCTYPE html
  PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd&quot;&gt;
<html>
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <meta http-equiv="X-UA-Compatible" content="IE=8">

...

This makes no difference to IE9.

I've also tried added a custom header to everything under /GeoNetwork in my Apache config like:

HTTP/1.1 200 OK
Date: Fri, 13 Jan 2012 10:54:52 GMT
Server: Apache-Coyote/1.1
Pragma: no-cache
Cache-Control: no-cache
Expires: -1
Content-Type: text/html;charset=UTF-8
X-UA-Compatible: IE=8
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked

This also makes no difference to IE9.

I note that if I, say, force an error in IE9 (like for instance if I try logging on to the admin area with incorrect credentials), then click back to previous page, the page loads.

According to IE 6 I have an unspecified error in line 648, char 186 in the home page.

According to IE 9 the error is actually in (line 647, character 186) in the openlayers.js file (...\geonetwork2-6-4\web\geonetwork\scripts\openlayers\openlayers.js)

I assume the error is the same...

This location is a prototyping declaration for the OpenLayers renderer, specifically the supported:function(){return!!(document.namespaces);} definition.

I note that this section of code has been cited before as causing a problem with other OpenLayers implementations:

http://stackoverflow.com/questions/1081812/javascript-unspecified-error-in-open-layers

and

http://trac.osgeo.org/openlayers/ticket/2304

I note that this is not regarded as a bug in OpenLayers, rather a problem in the code that uses the OpenLayers functionality.

I can't work out though what needs to be changed in our JavaScript code to get our home page to wait until document.namespaces is ready to be called.

Any ideas?

Interestingly...

If I remove the supported:function(){return!!(document.namespaces);} from the prototype declaration and then try to open the page in IE9 I get a pop-up box that tells me that my:

'browser does not support vector rendering' if I then click ok, the page loads...

I'm obviously not surprised that I got some error for removing the supported:function()... I am surprised though that the check seems to be pointless.

I tried opening the page in Firefox and Opera when it was in this 'disabled' state and got no pop-up warning at all! The pages just loaded.

So over to you javascript gurus to help me understand this issue.

Many thanks

James Passmore
GIS and WWW Specialist
Information Systems and Infrastructure,
British Geological Survey,
http://www.bgs.ac.uk/

+44 (0)115 936 3125

--
This message (and any attachments) is for the recipient only. NERC
is subject to the Freedom of Information Act 2000 and the contents
of this email and any reply you make may be disclosed by NERC unless
it is exempt from release under the Act. Any material supplied to
NERC may be stored in an electronic records management system.

Dear James,

I came across your post as I have the same problem with GeoNetwork 2.6.4 to
render the homepage correctly on IE9. I wanted to ask you whether you
managed to fix the problem or identify the cause of the problem in the
openlayers.js?

Your help would be greatly appreciated!

Thanks,
Jennifer

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/GeoNetwork-2-6-4-main-home-display-problems-with-IE6-IE7-and-IE9-tp3860323p5015121.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.

Hi Jennifer

Check about this later commit in 2.6.x branch if solves the issue:
https://github.com/geonetwork/core-geonetwork/commit/a925e86d11ce1a19948949a2b7f103c899875b03

Also note that don't think IE6 will work, it's a bit painful to support
that browser.

After updating header.xsl, you'll need to restart GeoNetwork to get the
change as xsl files are cached in memory.

Regards,
Jose García

On Fri, Nov 9, 2012 at 12:30 PM, jenn7 <jennbusuttil@anonymised.com> wrote:

Dear James,

I came across your post as I have the same problem with GeoNetwork 2.6.4 to
render the homepage correctly on IE9. I wanted to ask you whether you
managed to fix the problem or identify the cause of the problem in the
openlayers.js?

Your help would be greatly appreciated!

Thanks,
Jennifer

--
View this message in context:
http://osgeo-org.1560.n6.nabble.com/GeoNetwork-2-6-4-main-home-display-problems-with-IE6-IE7-and-IE9-tp3860323p5015121.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_nov
_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at
http://sourceforge.net/projects/geonetwork

--
*
GeoCat Bridge for ArcGIS allows instant publishing of data and metadata on
GeoServer and GeoNetwork. Visit http://geocat.net for details.
_________________________
Jose García
GeoCat bv
Veenderweg 13
6721 WD Bennekom
The Netherlands
http://GeoCat.net/&gt;

*

Hi Jennifer,

Yes I have resolved the issue, and my GeoNetwork 2.6.4 implementation now
supports IE6, IE7, IE8, and IE9.

The issue is nothing to do with the patch the Jose mentions, and my pages do
not include the <meta http-equiv="X-UA-Compatible" content="IE=8"/> tag (or
indeed any other X-UA-Compatible tag).

You need to add:
     document.namespaces;

just before

     Ext.onReady(function(){...

in web/geonetwork/xsl/main-page.xsl (approx line 211)

That's it!

Thanks go to James Long (International Arctic Research Center)

Cheers

James

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/GeoNetwork-2-6-4-main-home-display-problems-with-IE6-IE7-and-IE9-tp3860323p5015169.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.

Jose,

I tried to add <meta http-equiv="X-UA-Compatible" content="IE=8"/> after the
</title> and the homepage is showing up much better than before. (Before
there was the logo on both sides and a blue background while now the
backround is white as it is supposed to be and the whole banner including
the menu bar is showing correctly. However the rendering of the map and the
left hand side section are not showing up immediately. They are showing up
when I refresh the page.) Is this normal?

Thanks
Jennifer

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/GeoNetwork-2-6-4-main-home-display-problems-with-IE6-IE7-and-IE9-tp3860323p5015203.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.

Hi James,

I tried your change, and I added *document.namespaces* just before the
*Ext.onReady(function(){...* you mentioned. However it did not work for me.
Please note I inserted this line outside the function present above the
*Ext.onReady(function(){... *. Can you please let me know if this is the
correct way?

Thanks
Jennifer

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/GeoNetwork-2-6-4-main-home-display-problems-with-IE6-IE7-and-IE9-tp3860323p5015204.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.

Hi Jennifer

The issue with document.namespaces is that when is executed Ext.onReady, in
IE (at least some versions) some of the stuff required by OpenLayers is not
yet available (OpenLayers code is executed inside Ext.onReady). It becomes
available only on window load event.

I have done a change for a project moving in main-page.xsl Ext.onReady code
inside init function:

function init() {
      Ext.onReady(function(){
        ....
      });

     // Actual init code here
}

And seem better, but require more testing. Will manage next week and if
works will commit this change.

Regards,
Jose García

On Fri, Nov 9, 2012 at 5:12 PM, jenn7 <jennbusuttil@anonymised.com> wrote:

Hi James,

I tried your change, and I added *document.namespaces* just before the
*Ext.onReady(function(){...* you mentioned. However it did not work for
me.
Please note I inserted this line outside the function present above the
*Ext.onReady(function(){... *. Can you please let me know if this is the
correct way?

Thanks
Jennifer

--
View this message in context:
http://osgeo-org.1560.n6.nabble.com/GeoNetwork-2-6-4-main-home-display-problems-with-IE6-IE7-and-IE9-tp3860323p5015204.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_nov
_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at
http://sourceforge.net/projects/geonetwork

--
*
GeoCat Bridge for ArcGIS allows instant publishing of data and metadata on
GeoServer and GeoNetwork. Visit http://geocat.net for details.
_________________________
Jose García
GeoCat bv
Veenderweg 13
6721 WD Bennekom
The Netherlands
http://GeoCat.net/&gt;

*