Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Problem with product_info.php


Guest

Recommended Posts

Hi,

 

I am looking for some help. Since I loaded a lightbox contribution I have been getting errors everytime I load a product info page. In the bottom of an left hand corner you get the following error:

 

Done, but with errors on page

 

There is nothing visible that I can see. However, I am new to all this and I do not know where to start looking in order to fix the problem. I don't really want to remove the contribution because I really like the lightbox effect.

 

Anyone any ideas?

Link to comment
Share on other sites

The "Done, but with errors on page" typically is the result of a javascript error and typically will show up under the Internet Explore browser. You may have a corrupted "javascript" script as result of the install of the contribution.

 

You might want to give us a sample URL that folks could look at and view the javascript source to see what the code problem is. You should be able to click on the "Done, but with errors on page" and maybe get a better idea where the failed javascript is.

 

Tom

Link to comment
Share on other sites

The "Done, but with errors on page" typically is the result of a javascript error and typically will show up under the Internet Explore browser. You may have a corrupted "javascript" script as result of the install of the contribution.

 

You might want to give us a sample URL that folks could look at and view the javascript source to see what the code problem is. You should be able to click on the "Done, but with errors on page" and maybe get a better idea where the failed javascript is.

 

Tom

Thanks for the quick reply. Here is an example:

 

Crocs Kids Cayman Black

Link to comment
Share on other sites

Both IE and Firefox seem to display the lightbox popup image ok. IE complains about a line 100 in the javascript and an undefined "element". I didn't see any flagrant javascript errors, however there may be an incompatibility in one of the contribution javascript "includes".

 

Maybe some else can shed a bit more light on this one. You might also want to post this in the contribution thread if there is one. Also post it in the contribution forum.

 

Tom

Link to comment
Share on other sites

The error I get is:

 

'_gat' is undefined.

Related to the Google Analytics code.

 

Change your Google Analytics script to this:

 

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript"> 
if (typeof(_gat) == "object") { 
 var pageTracker = _gat._getTracker("UA-2445733-3"); 
 pageTracker._initData(); 
 pageTracker._trackPageview(); 
} 
</script>

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

The error I get is:

 

'_gat' is undefined.

Related to the Google Analytics code.

 

Change your Google Analytics script to this:

 

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript"> 
if (typeof(_gat) == "object") { 
 var pageTracker = _gat._getTracker("UA-2445733-3"); 
 pageTracker._initData(); 
 pageTracker._trackPageview(); 
} 
</script>

Thanks for this. I have made the change you recommend. However, the error is still there.

 

Cheers though!! I do appreciate it!

Link to comment
Share on other sites

Clear your browser cache.

 

Hold the <Ctrl> key down, and do a "page refresh".

 

I don't get any error any more (I did before ther change).

:huh:

 

I'm using IE7

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Clear your browser cache.

 

Hold the <Ctrl> key down, and do a "page refresh".

 

I don't get any error any more (I did before ther change).

:huh:

 

I'm using IE7

Done that and cleared all the temp file in the tools section of IE. Still getting the error though. Seems like a real funny one.

 

Thanks again!

 

When I open the file in Dreamweaver and do a browser compatability check it seams to have a problem with this section of code

	?>
[b]<link rel="stylesheet" href="lightbox/lightbox.css" type="text/css" media="screen" />[/b]
<script type="text/javascript" src="lightbox/lightbox.js"></script>
<script type="text/javascript" src="lightbox/prototype.js"></script>
<script type="text/javascript" src="lightbox/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="lightbox/lightbox.js"></script>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<?php include(DIR_WS_INCLUDES . 'easy_meta_tags.php'); ?>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
[b]<link rel="stylesheet" type="text/css" href="stylesheet.css">[/b]

 

For the first line in bold it states there is one error in external css files

For the Second there are three separate lines of errors totaling 9 errors in external css files.

 

I don't know if this helps. If the errors are in the stylesheet then I do not really know where to look ot correct them.

:blink:

Link to comment
Share on other sites

OK.

 

I closed the browser window, opened a new one, and I do get an error.

 

Different error, different place.

 

"Element' is undefined.

I can't see this one.

:blush:

 

At least the Google script isn't the problem.

 

Funny thing is, if you refresh the page, the error goes away.

:huh:

 

At least mine does...

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

OK.

 

I closed the browser window, opened a new one, and I do get an error.

 

Different error, different place.

 

"Element' is undefined.

I can't see this one.

:blush:

 

At least the Google script isn't the problem.

 

Funny thing is, if you refresh the page, the error goes away.

:huh:

 

At least mine does...

Same here - If I refresh is goes away!

Link to comment
Share on other sites

OK.

 

The error console in Firefox gives a hint:

 

Object.extend is not a function in /lightbox/lightbox.js line 128

That portion of the code:

 

Object.extend(Element, {
getWidth: function(element) {

Now I know where 'Element' is.

:lol:

 

Although, I don't know how to fix it...

:blush:

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Found something:

 

Never mind. I figured it out. But I think it would be smart if the support section on the lightbox main page mentioned that it was important that lightbox.js was loaded last in the script list. Because that's all I had to do.

In your source I see:

 

<script type="text/javascript" src="lightbox/lightbox.js"></script>
<script type="text/javascript" src="lightbox/prototype.js"></script>
<script type="text/javascript" src="lightbox/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="lightbox/lightbox.js"></script>

Maybe just delete that first reference to lightbox.js?

:unsure:

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Found something:

In your source I see:

 

<script type="text/javascript" src="lightbox/lightbox.js"></script>
<script type="text/javascript" src="lightbox/prototype.js"></script>
<script type="text/javascript" src="lightbox/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="lightbox/lightbox.js"></script>

Maybe just delete that first reference to lightbox.js?

:unsure:

Wow, so simple! thanks so much worked at treat!!

 

Cheers, I owe you one!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...