PDA

View Full Version : YAHOO undefined at add to cart??


rdlugosz
Aug-26-2006, 08:28 AM
Is anyone else seeing this? I click (as a logged-out user in MSIE) buy this photo & I see the following error:

http://rdlugosz.smugmug.com/photos/90752166-L.jpg

I see it in any gallery... thoughts?

http://gallery.rrdphoto.com

Andy
Aug-26-2006, 08:35 AM
Is anyone else seeing this? I click (as a logged-out user in MSIE) buy this photo & I see the following error:

http://rdlugosz.smugmug.com/photos/90752166-L.jpg

I see it in any gallery... thoughts?

http://gallery.rrdphoto.com
Hi, thanks for posting. Standby, I'll try and validate.

Andy
Aug-26-2006, 08:39 AM
Trying multiple times to buy from your site, no problems, IE6. I cannot replicate that error.

rdlugosz
Aug-26-2006, 08:49 AM
Trying multiple times to buy from your site, no problems, IE6. I cannot replicate that error.
That's odd - I can see the error in both firefox & ie, logged in or logged out. The firebug extension is telling me that the error exists at line 24 of smugmug.js:

// don't want the lightbox?
useLightbox = true;

// don't like the PhotoRank mouseover?
displaySmugPopular = true;

// namespaces for YUI stuff
var YD = YAHOO.util.Dom; <--this is line 24.
var YE = YAHOO.util.Event;
var YA = YAHOO.util.Anim;

edit: Cleared cookies & cache; error still coming up.

Andy
Aug-26-2006, 08:53 AM
That's odd - I can see the error in both firefox & ie, logged in or logged out. The firebug extension is telling me that the error exists at line 24 of smugmug.js:

// don't want the lightbox?
useLightbox = true;

// don't like the PhotoRank mouseover?
displaySmugPopular = true;

// namespaces for YUI stuff
var YD = YAHOO.util.Dom; <--this is line 24.
var YE = YAHOO.util.Event;
var YA = YAHOO.util.Anim;

edit: Cleared cookies & cache; error still coming up.
Thanks for the added info - JT's looking at it.

{JT}
Aug-26-2006, 08:54 AM
Can we get a link to the gallery in question here?

I can not validate with any of the browsers I am running. That error means that the one of our yahoo javascript files did not load for some reason.

That's odd - I can see the error in both firefox & ie, logged in or logged out. The firebug extension is telling me that the error exists at line 24 of smugmug.js:

// don't want the lightbox?
useLightbox = true;

// don't like the PhotoRank mouseover?
displaySmugPopular = true;

// namespaces for YUI stuff
var YD = YAHOO.util.Dom; <--this is line 24.
var YE = YAHOO.util.Event;
var YA = YAHOO.util.Anim;

edit: Cleared cookies & cache; error still coming up.

rdlugosz
Aug-26-2006, 08:58 AM
Can we get a link to the gallery in question here?

I can not validate with any of the browsers I am running. That error means that the one of our yahoo javascript files did not load for some reason.
It's any gallery on my site. In fact, I get it on Andy's site too. My guess is that our filewall in the office is blocking the Yahoo JS... what's the URL of that JS file?

edit: it's not; see below.

{JT}
Aug-26-2006, 09:05 AM
If you view source and search for yahoo you will see all the files we use:
http://gallery.rrdphoto.com/include/js/yui/yahoo/yahoo-min-20060728180535.js


It's any gallery on my site. In fact, I get it on Andy's site too. My guess is that our filewall in the office is blocking the Yahoo JS... what's the URL of that JS file?

rdlugosz
Aug-26-2006, 10:04 AM
If you view source and search for yahoo you will see all the files we use:
http://gallery.rrdphoto.com/include/js/yui/yahoo/yahoo-min-20060728180535.js

Well, it's not the firewall. I just reproduced the error on a second PC (personal; not with any of the work junk installed) and connected to the net via my verizon phone (so it's absolutely not going through any of my work firewalls). I get the same problems on my site as well as Andy's! :)

rdlugosz
Aug-26-2006, 01:46 PM
Well, it's not the firewall. I just reproduced the error on a second PC (personal; not with any of the work junk installed) and connected to the net via my verizon phone (so it's absolutely not going through any of my work firewalls). I get the same problems on my site as well as Andy's! :)


Any updates on this one guys?

Andy
Aug-26-2006, 01:59 PM
Any updates on this one guys?
No. JT's aware of it, looked into it on Saturday morning (today). We cannot recreate in any browser on any site. We'll keep looking.

rdlugosz
Aug-26-2006, 02:40 PM
No. JT's aware of it, looked into it on Saturday morning (today). We cannot recreate in any browser on any site. We'll keep looking.
Thanks! I'll check it when I get home, which will make for a third PC/ISP combo & I'll have a buddy do the same. I'll post an update here...

update: same behavior at home; we'll see what my friend says.

rdlugosz
Aug-26-2006, 05:46 PM
Thanks! I'll check it when I get home, which will make for a third PC/ISP combo & I'll have a buddy do the same. I'll post an update here...

There's definitely something going on. From a friend in detroit in his javascript console:

Error: YAHOO is not defined
Source File: http://www.smugmug.com/include/js/smugmug.js
Line: 24

that's what i get when i add a photo to the cart.

Firefox 1.5.0.6 for the mac.

-spencer

flyingdutchie
Aug-26-2006, 07:16 PM
There's definitely something going on. From a friend in detroit in his javascript console:

Error: YAHOO is not defined
Source File: http://www.smugmug.com/include/js/smugmug.js
Line: 24

that's what i get when i add a photo to the cart.

Firefox 1.5.0.6 for the mac.

-spencer

I tried your site:
IE6: No problem
FireFox 1.5.0.6: I get an error in the console that YAHOO is not defined.

And,
It happens also on my site. Go to a gallery, click 'buy this photo' and FireFox report the 'YAHOO is not defined' error.

Update:
When on my site (before and after hitting the buy button), i type into the FireFox address bar:
javascript:YAHOO
I get [object Object] as a reply. This is good, since YAHOO is defined.

Strange... YAHOO is there, at least after the page has been loaded. Is there a sync error between the execution of the JavaScript and clicking the 'buy' button?

devbobo
Aug-26-2006, 07:51 PM
I have looked into this code further...and i think I have found the issue.

in the function call addCartSingle the following line appears...

addToCartFrame.setAttribute("src", "http://www.smugmug.com/cart/frameaddtocart.mg?ImageIDs="+ImageIDs);

Checking the source for result from frameaddtocart.mg,


<*!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"*>
<*html xmlns="http://www.w3.org/1999/xhtml"*>
<*head*>
<*title*>Add to Cart<*/title*>
<*script src="/include/js/smugmug.js" type="text/javascript"*><*/script*>
<*script type="text/javascript"*>
function addToCartFrame(ImageIDs) {
postArray = new Array();
postArray['tool'] = 'singleAdd';
postArray['ImageIDs'] = ImageIDs;
ajax_query(handleJS, 'http://www.smugmug.com/hack/RPC/cart.mg', postArray, true);
}
function cartAddSuccess(processed,errorText,errorImages) {
if (errorText != '') {
errorText = URLDecode(errorText);
errorText = errorText.split('***');
alert(errorText[0]);
}
self.close();
}
<*/script*>
<*/head*>
<*body*><*/body*>
<*/html*>


This HTML has a reference to the smugmug.js which contains the definitions for the YAHOO aliases, but there is no js reference to YAHOO libraries.

Cheers,

David

rdlugosz
Aug-27-2006, 03:54 AM
I tried your site:
IE6: No problem
...


You may have script debugging disabled in IE; this could explain why you don't see the error here.

This HTML has a reference to the smugmug.js which contains the definitions for the YAHOO aliases, but there is no js reference to YAHOO libraries.

David - you da man! Hopefully the SM guys can put in a quick patch for this one. Thanks for looking into it.

rdlugosz
Aug-30-2006, 12:00 PM
Andy - now that we know what the problem is, can we get it on the list to be fixed? Just wanted to follow up since we haven't had a reply from you or JT since the root cause was discovered.

Andy
Aug-30-2006, 12:17 PM
Andy - now that we know what the problem is, can we get it on the list to be fixed? Just wanted to follow up since we haven't had a reply from you or JT since the root cause was discovered.
It's been reported, and JT knows about it - thanks!