"Error on page" when loading in IE [Solved]

Author Message

Vidar Østevik

Tuesday 25 April 2006 11:18:54 am

Hi everyone!
I've fiddeled around for a bit with eZ publish, and are a very happy user!
But, I have a problem that I cant find any solution for.
Down in the left corner of IE, there are a field telling you if the page is fully loaded.
Every page I load, I get the text "Error on page". When I doule click on the error mark, I'm told that "document.getElementByld(...) is null or not an object" (Direct translated from Norwegian.. May not be exact the phrase in english) in line 3 and 17.
I'm using IE explorer 6.0.2900.2180 SP2.
Nothing is displayed in the error log.

This problem does not show up in Mozilla.

Any suggestions?

Regards,
Vidar

Łukasz Serwatka

Wednesday 26 April 2006 12:09:31 am

Hi Vidar,

Do you use any custom JavaScript scripts in your website?

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Vidar Østevik

Wednesday 26 April 2006 8:39:13 am

Hi Lukasz!

I have no custom javascript in my webpage, but I'm running suckerfish as menu.
I guess the error is caused by "script_suckerfish.js", because the java file contains the command "getElementsById".

In line 2 there is

var sfEls = document.getElementById("nav").getElementsByTagName("LI");

And in line 16 there is

var sfEls = document.getElementById("tache_menu").getElementsByTagName("LI");

Maybe this is the problem?I'm not a skilled java programmer, so if anybody have suggestions, I would appreciate it!

I also tried to access the web page via my laptop, running XP Pro and IE 6.0.2900.2180 SP2.
And the error message did not appear here!?

Regards
Vidar

Vidar Østevik

Tuesday 16 May 2006 1:15:34 pm

If anybody have the same problem, the solution that worked for me was to remove the following lines in script_suckerfish.js

sfHover = function() {
          var sfEls = document.getElementById("tache_menu").getElementsByTagName("LI");
          for (var i=0; i<sfEls.length; i++) {
             		sfEls[i].onmouseover=function() {
                this.className+=" sfhover";
             }
             sfEls[i].onmouseout=function() {
                this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
             }
          }
       }
       if (window.attachEvent) window.attachEvent("onload", sfHover);

If you read the double_top.tpl that suckerfish uses as an override, you will find that there are not created any div called tache_menu, so the original script will return the mentioned error ("document.getElementById is null or not an oject") because there does not exist an Element called "tache_menu". So commenting this out would fix the problem!

Vidar

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 19:31:57
Script start
Timing: Jan 18 2025 19:31:57
Module start 'layout'
Timing: Jan 18 2025 19:31:57
Module start 'content'
Timing: Jan 18 2025 19:31:58
Module end 'content'
Timing: Jan 18 2025 19:31:58
Script end

Main resources:

Total runtime0.7103 sec
Peak memory usage4,096.0000 KB
Database Queries60

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0060 588.0547152.6406
Module start 'layout' 0.00610.0031 740.695339.4766
Module start 'content' 0.00920.6995 780.1719559.3906
Module end 'content' 0.70870.0016 1,339.562512.1250
Script end 0.7103  1,351.6875 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.4671160.0002
Check MTime0.00130.1873160.0001
Mysql Total
Database connection0.00100.140510.0010
Mysqli_queries0.657192.5110600.0110
Looping result0.00050.0735580.0000
Template Total0.680795.820.3403
Template load0.00210.290020.0010
Template processing0.678695.531520.3393
Template load and register function0.00020.022410.0002
states
state_id_array0.00070.098410.0007
state_identifier_array0.00070.091720.0003
Override
Cache load0.00180.2476360.0000
Sytem overhead
Fetch class attribute can translate value0.00060.086620.0003
Fetch class attribute name0.00100.134050.0002
XML
Image XML parsing0.00060.079220.0003
class_abstraction
Instantiating content class attribute0.00000.001450.0000
General
dbfile0.00070.1054180.0000
String conversion0.00000.001240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
11content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 26
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs