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">
<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.