Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#996 closed defect (fixed)

IE7 Main page failes to load due to javascript error.

Reported by: ianwallen Owned by: geonetwork-devel@…
Priority: blocker Milestone: v2.8.1
Component: User interface (web) Version: v2.8.0RC0
Keywords: Cc:

Description

Accessing the home page with IE7 displays

GeoNetwork opensource catalogue Loading ...

There is a JavaScript error with the following.

line: 366 Char: 7 Error: Object doesn't support this property or method Code:0

When I view the source I see the following for line 365 and 366

Ext.onReady(function(){

$("loading").hide();

See http://osgeo-org.1560.n6.nabble.com/current-nightly-build-does-not-work-with-ie7-tc4989131.html for more details.

Attachments (2)

main-page.xsl.patch (420 bytes ) - added by ianwallen 12 years ago.
Proposed patch
ticket996-header_cleanup.patch (4.6 KB ) - added by ianwallen 12 years ago.
Proposed patch to cleanup the headers

Download all attachments as: .zip

Change History (16)

comment:1 by ianwallen, 12 years ago

I have a simple patch that seems to correct. It seems like IE7 does not like the following

$("loading").hide();

Changing it to extjs notation as follows

Ext.get("loading").hide();

Seems to correct the problem

I'm not sure if this breaks anything else. Also This may not be solving the real underlining problem of why it did not work in the first place (but works with other browsers)? i.e. there may be other errors related to the $() notation....

by ianwallen, 12 years ago

Attachment: main-page.xsl.patch added

Proposed patch

comment:2 by ianwallen, 12 years ago

Although this patch fixes the main page, it was noticed that there are similar issues elsewheres with ie7.

From the administration section

  • My metadata
  • Add a metadata schema/profile
  • Update a metadata schema/profile
  • Delete a metadata schema/profile

all have similar issues with the following code.

Event.observe(window, 'load', function() {

if ($("content_container")) {

$("content_container").show();

}

});

The following links also fail to work - for other reasons which may be related.

  • Harvesting management
  • Manage thesauri
  • Manage directories

comment:3 by ianwallen, 12 years ago

Just realized that the patch may cause issues as the ExtJS library may not be loaded on all the pages that use the new code.

Attempted to apply similar patch for "content_container" and got error related to the "Ext" undefined.

I don't understand the structure of the pages so I'm not sure where to update the code to include the extJS lib.

comment:4 by ianwallen, 12 years ago

Milestone: v2.8.0 RC1v2.8.0 RC2

comment:5 by ianwallen, 12 years ago

See discussion from http://osgeo-org.1560.n6.nabble.com/Geonetwork-2-8-RC1-and-Internet-Explorer-7-td5005194.html

Another possible fix may be to add "<meta http-equiv="X-UA-Compatible" content="IE=7"/> " to xsl/header.xsl

comment:6 by delawen, 12 years ago

Owner: changed from geonetwork-devel@… to delawen

comment:7 by ianwallen, 12 years ago

Milestone: v2.8.0 RC2v2.8.0
Priority: majorblocker

Without a fix for this ticket, IE 7 users will not be able to use the software. Changed to blocker as the current system requirement include IE 7. If we decide that IE7 is not longer supported then we can change the priority back.

comment:8 by ianwallen, 12 years ago

The following link identified the true bug.

https://groups.google.com/forum/?fromgroups=#!topic/prototype-scriptaculous/3087JamnhwI

So the problem in this case is that prototype.js is included twice.

If I removed the protocol.js call from main-page.xsl it seems to fix the issue - But comments specify that it was added "To avoid an interaction with prototype and ExtJs.Tooltip, should be loadded before ExtJs"

Anyone know anything about this?

comment:9 by ianwallen, 12 years ago

Owner: changed from delawen to geonetwork-devel@…

delawen - as there has not been any activity from your end I moved this bug back to the group for more visibility. Hope you don't mind.

Note: I guess it could also be the prototype.js from the utils.xsl that needs to be removed.

Either way one of them needs to be removed to fix the bug.

I'm not sure which one is the safest to remove.

by ianwallen, 12 years ago

Proposed patch to cleanup the headers

comment:10 by ianwallen, 12 years ago

I uploaded ticket996-header_cleanup.patch as a proposed patch to cleanup the headers.

Maybe we can apply the patch to the master for testing and later apply it to the 2.8.1 branch.

comment:11 by josegar74, 12 years ago

Related to this comment:

If I removed the protocol.js call from main-page.xsl it seems to fix the issue - But comments specify that it was added "To avoid an interaction with prototype and ExtJs?.Tooltip, should be loadded before ExtJs?"

Anyone know anything about this?


This was added when changed Intermap to OpenLayers/GeoExt. I can't remember exactly the problem, but I think ExtJs tooltips not displayed if prototype was loaded after ExtJs.

comment:12 by ianwallen, 12 years ago

Commit to master is 09165ed16f5849ba72556cf8edc0d6c85f0329e4

Will let it soak for a little bit - if it does not cause any issues, will merge the change into the 2.8 branch.

comment:13 by ianwallen, 12 years ago

Resolution: fixed
Status: newclosed

Fixed in commit 5eb4ef2410a8f3e1545f4ea6f1046b034a4621fe on 2.8 branch

comment:14 by ianwallen, 12 years ago

Milestone: v2.8.0v2.8.1
Note: See TracTickets for help on using tickets.