PDA

View Full Version : 'Undefined' is null or not an object


jspe377523
09-01-2006, 09:59 AM
Hi there I am getting the above error in IE, Firefox works great. Arghhhhhhh!!

The demo page works great so I know its something I have done in the code of the main page but what!!

take a look at www.maltonandoldmaltoncc.co.uk for the page

Thanks
James

jspe377523
09-01-2006, 10:25 AM
Tis ok I sorted it I had two references to OL one in the main file and one in the include file. This stopped it working correctley.

Thanks anyway
James

TenX
09-29-2006, 09:42 PM
I have this same problem....can you please help me out with it? when you refer to the main file and the include file, what files do you refer to and what were the references?

Brian
09-30-2006, 10:38 AM
If you followed the Integration section of the instructions, you added just 3 lines of code to your page in the specific areas mentioned with the examples of code.

You appear to have added multiple request for the OL code to your page and therefore have more than one set of instructions for the mouseover javascript. IE is confused when this happens, but it seems FireFox and figure out what should be happening.

You need to make sure you only have the 3 lines of code in your page to avoid duplication of code in your page.

FWIW, you can have more than the three lines of code, but in your circumstance, only the CSS, OL and calendar.php require are needed.

TenX
09-30-2006, 08:08 PM
The site runs on Joomla, so I did not follow the standard integration instructions as are on the Calendar web site. Rather I followed the Mambo integration instructions as posted by Xirtam. Uploaded the calendar files to a folder under Modules and then uploaded the mod_escal module and configured the calendar.
The only place that I can find the three lines of code you were referring is in the mod_escal module. Is there a particular file that I should be looking at? I did not manually input the three lines of code in any file that I know of.
I apologize for the continued questions...but this is driving me bananas!

Brian
09-30-2006, 08:35 PM
Ah... you need to post this in the Integration forum. I'll move it for you and someone that is familiar with this should be able to help.

Brian
10-02-2006, 09:27 AM
Can you look in all of the files for the calendar command $CSS=1; ?

TenX
10-03-2006, 06:56 PM
Sorry, submitted in error.

TenX
10-03-2006, 07:09 PM
Brian,
There are four files where this code shows up:

1. mod_escal.php <?php $CSS=1; require ("modules/calendar/calendar.php");
2. demo.php <?php $CSS=1; require ("calendar.php");
3. demoBlogphp <?php $CSS=1; require ("calendar.php");
4. printable.php <?php $CSS=1; require ("calendar.php");


Cool Mustang! BTW....I have a '65 289....

ve9gra
10-04-2006, 08:48 AM
The code is most likely to be in mod_escal.php. Do you have a URL to your installation so we can see more precisely what's going on?

TenX
10-04-2006, 05:19 PM
Sure... pack385.org (http://www.pack385.org)

Thanks.

ve9gra
10-05-2006, 08:28 PM
I think that you've used an older version of the mod which isn't entirely compatible with version 6 of the script.

Here's my latest version. Try it and see if it solves your problem.

TenX
10-05-2006, 09:57 PM
The mod_escal that was on the site, I downloaded from Brian's sticky at the head of this section....but I uninstalled it anyway and uploaded the one you posted. Unfortunately, the end result is the same :ugh: and it still has the same errors in IE.
Can everyone just boycott IE and use Firefox allof the time?:teeth_smi I don't have to fix a thing then!

TenX
10-07-2006, 12:14 PM
:clap: Ok. I finally figured out the issue....by the process of elimination, not really having any programming skills. I am using a module (Z Weather (http://www.zcontent.net/)) on my site to show the local weather. This module uses the Overlib functionality also, and having both modules using this function, evidently is causing the Calendar to have the errors mentioned above.
I turned the Overlib off in the Z Weather module and now the calendar is functioning fine in both IE and Firefox.
Don't know if one of you knowledgeable and helpful folks can figure out a way to make both work at the same time (it would be great!), but for now this is an ok solution for me.
Once again, thank you for all of the help provided. :)

ve9gra
10-08-2006, 07:30 PM
I guess that at this point, the best guys to ask would be the overLib team.

jsadony
10-25-2006, 02:52 PM
I guess that at this point, the best guys to ask would be the overLib team.

The error_log message mentioned at the top are a problem with zWeather and PHP5. I get the same errors with Bookmarks. You can turn off the verbose error loging in PHP5 and you loogs won't fill up as fast.

Your overlib issue comes from the fact that overlib is being called twice (comes down as javascript in the resulting html source). When this is happens overlib fails on the client. If you use two applications that use overlib you need to:

1. Not use them on the same page.
2. Disable overlib in one and make sure the module that calls overlib is called first. (module order)
3. Call overlib in your template and disable the overlib calls in the mosdules.

Now you can disable the overlib calls in EPC because to don't have access to the source. BUT you can run EPC in a wrapper. That way it will not be affected by any other overlib calls.

If you don't have the source this scenario requires some creative thinking to work make a around.

Joe

ve9gra
10-25-2006, 03:47 PM
Yes you can disable the overLib call ... comment out the following line
$OL=1; require("calendar/calendar.php");

Note that the mouse-over popups will not work if overLib is disabled.

jafar78
11-07-2006, 10:51 AM
Hi,

You can overlib as many as many times as you want. All you have to is to change the name of div overDiv to a different name for the second call. overDiv1, overDiv2. You need to change this in the js file as well as the form which has the Date Picker in it. You can also make dynamic by setting to a var and list the vars in a file or db to be called. I hope this helps.

Regards, --jh
:classic:

ve9gra
11-08-2006, 05:15 PM
Nice! Brian, it might be worth it to choose a unique identifier for the Calendar so that we don't run into this problem again.

triadib
11-28-2006, 09:59 AM
Hi,

for everyone who is interested in (tested with IE 6/7 and FF 2.0)

edit calendar.php in line 95:


echo "<div id=\"overDiv\" style=\"position:absolute; visibility:hidden; z-index:1000;\"></div><script type=\"text/JavaScript\" src=\"".$urlPath."overLIB/".$olFileName."\"><!-- overLIB (c) Erik Bosrup --></script>";
if ($ol_anchor==1) echo "<script src=\"".$urlPath."overLIB/overlib_anchor.js\"></script>";
}

into

echo "<div id=\"overDiv_epc\" style=\"position:absolute; visibility:hidden; z-index:1000;\"></div><script type=\"text/JavaScript\" src=\"".$urlPath."overLIB/".$olFileName."\"><!-- overLIB (c) Erik Bosrup --></script>";
if ($ol_anchor==1) echo "<script src=\"".$urlPath."overLIB/overlib_anchor.js\"></script>";
}


With this any conflicts with existing modules should be solved and you can use $OL=1 for popups AND $CSS=1 too for using epc-CSS settings.

The second problem can occur when logging into joomla frontend because the content component use overlib too.

For this issue edit in joomla base dir ./component/com_content/content.html.php in line 648.


mosCommonHTML::loadOverlib();

and change to:

// mosCommonHTML::loadOverlib();


The result you can see at http://www.tg-tria-ruesselsheim.de
Mouseover the three columns in first row showing events from different categories (mod_include) and click to menu "Terminkalender" (wrapper) shows the calendar in "TOC" mode.

For further questions feel free to PM.

Best regard from Germany
Dirk

p.s.: @Brian: perhaps it is worth for a sticky post