WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WORKSFORME
14778
Add To Basket button doesn't work in WebKit
https://bugs.webkit.org/show_bug.cgi?id=14778
Summary
Add To Basket button doesn't work in WebKit
Alex Stapleton
Reported
2007-07-27 03:28:45 PDT
Throws a JS exception. Works in other browsers.
Attachments
Add attachment
proposed patch, testcase, etc.
David Kilzer (:ddkilzer)
Comment 1
2007-07-27 10:12:18 PDT
Confirmed with a local debug build of WebKit
r24669
with Safari 3 Public Beta v. 3.0.2 (522.12) on Mac OS X 10.4.10 (8R218). The JavaScript Console shows: TypeError: Undefined value
http://www.comet.co.uk/comet/ev2/js/addtobasket.js
Line: 100 Strange console output when the page is loaded as well: Unsafe JavaScript attempt to access frame with URL
http://www.comet.co.uk/cometbrowse/product.do?sku=380083
from frame with URL
http://www.comet.co.uk/cometbrowse/product.do?sku=380083
. Domains, protocols and ports must match. [8723]
http://ecustomeropinions.com/popup/i.php?sid=964408492&v=500&r=64375&xres=1280&yres=854&url=/cometbrowse/product.do%3Fsku%3D380083&referrer=http%3A//bugs.webkit.org/show_bug.cgi%3Fid%3D14778
line 3: TypeError: Undefined value (event handler):Can't find variable: oldonload
David Kilzer (:ddkilzer)
Comment 2
2007-07-27 10:13:19 PDT
Not a regression as similar behavior occurs in Safari 2.0.4 (419.3) with original WebKit on 10.4.10.
allan28
Comment 3
2007-12-17 16:12:06 PST
Works with Firefox useragent. Site uses browsersniffing, and mistakenly alters eventhandling for Safari: --- if(event.indexOf(fName)==-1) { if(cGU&&event.indexOf("function "+"(")==0) { fName=fName+";"+event.substring(event.indexOf("{"),event.length); } var newfunc=new Function("e",fName); return newfunc; --- Where cGU is true with Safari. Possibly tries to fix previous bad behaviour?
David Kilzer (:ddkilzer)
Comment 4
2007-12-18 05:34:53 PST
(In reply to
comment #3
)
> Works with Firefox useragent. > Site uses browsersniffing, and mistakenly alters eventhandling for Safari:
Is this custom shopping cart code, or are they using a third-party shopping cart for the site? Confirmed that switching to Firefox 2.0.0.2 user agent fixes the issue. FWIW, I'm seeing a new message printed to the JavaScript Console (whether using the default user agent or Firefox): Can't find variable: oldonload undefined Line: 2
David Kilzer (:ddkilzer)
Comment 5
2007-12-18 05:56:41 PST
Filled out a customer request form here regarding this issue:
https://comet.custhelp.com/cgi-bin/comet.cfg/php/enduser/ask.php
--- The shopping basket feature of comet.co.uk does not work with the Safari 3.0.x web browser on Windows XP or Mac OS X. This issue is being tracked by this bug:
http://bugs.webkit.org/show_bug.cgi?id=14778
Please consider testing and fixing the comet.co.uk web site to work properly with the Safari web browser. You may download a free beta of Safari 3 for Windows here:
http://www.apple.com/safari/
Thanks! Dave --- The reference number for your question is '071218-000176'.
David Kilzer (:ddkilzer)
Comment 6
2007-12-18 09:03:37 PST
(In reply to
comment #5
)
> Filled out a customer request form here regarding this issue: >
https://comet.custhelp.com/cgi-bin/comet.cfg/php/enduser/ask.php
> [...] > The reference number for your question is '071218-000176'.
I've already gotten a response! --- Response (Simon Pyper) 18/12/2007 Dear Mr Kilzer. Thank you for your recent email regarding web compatbility issues. I have passed your comments on to our IT/Web team to look at and I'm sure that they will be able to implement a solution to this problem. Regards, Simon Pyper Comet Customer Services ---
allan28
Comment 7
2007-12-18 13:09:40 PST
I'm not seeing this with the latest nightly (with Firefox useragent). Debugging showed that the "TypeError: Undefined value: oldonload" was caused by the snippet I included (slightly obfuscated js-file called eluminate.js). This is part of their stat/add-tracking software and is third-party, so you should probably mail Coremetrics (
http://www.coremetrics.com/company/contact_us.php
) instead, as it is their code that is in error. The "TypeError: Undefined value" at line 100 is caused by the first error, as a global variable isn't set since their onload-handler is wrecked by Coremetrics onload-handler and stops after the first error. If Coremetrics omits their Safari-check in their event-handler, everything should work. (In reply to
comment #4
)
> FWIW, I'm seeing a new message printed to the JavaScript Console (whether using > the default user agent or Firefox): > > Can't find variable: oldonload > undefined > Line: 2
David Kilzer (:ddkilzer)
Comment 8
2007-12-18 22:32:23 PST
(In reply to
comment #7
)
> If Coremetrics omits their Safari-check in their event-handler, everything > should work.
Thanks for the analysis! I've sent a note to support at coremetrics dot com about the issue. Hopefully this is already fixed in a software update and comet.co.uk can just pick up a new version!
David Kilzer (:ddkilzer)
Comment 9
2007-12-18 22:44:42 PST
(In reply to
comment #8
)
> Thanks for the analysis! I've sent a note to support at coremetrics dot com > about the issue. Hopefully this is already fixed in a software update and > comet.co.uk can just pick up a new version!
Response from Coremetrics support: Ticket #: 5377-4752077 Date Created: 12/19/2007 12:34 AM CDT
David Kilzer (:ddkilzer)
Comment 10
2007-12-19 05:54:45 PST
(In reply to
comment #9
)
> Response from Coremetrics support: > Ticket #: 5377-4752077 > Date Created: 12/19/2007 12:34 AM CDT
--- Hi David, We have forwarded your message to our Product Management team for further review and consideration for any future software releases. Please let us know if you need anything further. Thank you, Coremetrics Customer Support ---
Alex Stapleton
Comment 11
2008-07-02 02:51:46 PDT
It's still broken. Same error by the looks of things.
David Kilzer (:ddkilzer)
Comment 12
2008-07-02 06:44:36 PDT
(In reply to
comment #11
)
> It's still broken. Same error by the looks of things.
Confirmed. Interestingly, the "Add to Basket" link on the home page DOES work, but the "Add to Basket" link on an individual product page still gives the same error message.
Adam Barth
Comment 13
2010-01-02 10:02:37 PST
This works fine now. According to the comments above, this was a site issue all along.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug