Closed Bug 628581 Opened 13 years ago Closed 10 years ago

travelchannel.com: Ad banner loads in place of sweepstakes form

Categories

(Web Compatibility :: Site Reports, defect)

defect
Not set
major

Tracking

(blocking2.0 -)

RESOLVED FIXED
Tracking Status
blocking2.0 --- -

People

(Reporter: stephend, Assigned: hsivonen)

References

()

Details

(Keywords: regression)

Build: Mozilla/5.0 (Windows NT 6.1; rv:2.0b10pre) Gecko/20110124 Firefox/4.0b10pre

Not sure this is the right component (in fact, likely it's not, but I've no idea where to start).

STR:

1. Load http://www.travelchannel.com/
2. Click on the "From the Wild Within San Francisco: Enter to Win" banner, on the right (http://win.travelchannel.com/?refcd=win_tc_com)

Expected Results:

The form to enter the sweepstakes is displayed

Actual Results:

The sweepstakes form flashes, and is then replaced by the ad banner -- looks like some kind of incorrect load-event retargeting.
Severity: critical → major
Keywords: regression
The regression is caused by:
https://hg.mozilla.org/mozilla-central/rev/108a3a3878c1

And, FWIW, with a debug build, when the initial page is loaded I got:
WARNING: Not same origin error!: file /home/volkmar/projects/mozilla/mozilla-central-2/dom/base/nsJSEnvironment.cpp, line 425
JavaScript error: http://www.travelchannel.com/static_files/assets/js/tpc/third-party-content.js, line 414: jQuery is not defined
blocking2.0: --- → ?
Can the issue be here:

(http://www.travelchannel.com/static_files/assets/js/tpc/third-party-content.js)
case 'eprize':
	OAS_sitepage = 'www.travelchannel.com/sweeps';
	OAS_listpos = 'TopLeft,Middle2,x29,x20,x12,x21';
	Modules = 'header|footer|homepagefooter';
	VCMID = '';
	tcm.preload.js('http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js');
	tcm.preload.js('http://travel.resultspage.com/autosuggest/searchbox_suggest_v1.js');
	tcm.preload.js(tcm.jsBaseURI + '/app/tc.js');
[..]
	tcm.preload.js(tcm.jsBaseURI + '/omniture/tracking_third_party.js');
	break;

tcm.preload.js("foo") actually calls:
document.write('<scr' + 'ipt src="' + "foo" + '"><\/script>');

I'm wondering if this is failing...
(In reply to comment #2)
> I'm wondering if this is failing...

It is not.
There is a document.write call from onload. At this point, there is no more active parser so document.write implies document.open and create a new document.

This can be seen with this stack: http://mounir.pastebin.mozilla.org/982170

Thanks to Henri for the explanations :)
This is the first time I've seen a bug report about document.write from onload, so I think mitigating this problem on the browser side (by write-neutralizing events that aren't user events) would be an overreaction and probably too risky at this point of the release cycle anyway.

Moving over to evang.
Assignee: nobody → english-us
Component: DOM → English US
Product: Core → Tech Evangelism
QA Contact: general → english-us
Version: Trunk → unspecified
Summary: Ad banner loads in place of sweepstakes form → travelchannel.com: Ad banner loads in place of sweepstakes form
bclary,  do we still have ways to check for similar behavior and/or patterns across sites and ad networks?

kev, we may need to dig up contacts for travel channel and other sites if we see it show up more.
In this case it might be possible to watch for a document open occurring after the load has fired. Is there something similar to http://mxr.mozilla.org/mozilla-central/source/embedding/components/windowwatcher/public/nsIWindowWatcher.idl for documents?
I contacted travelchannel.com via their contact form.
Assignee: english-us → hsivonen
Status: NEW → ASSIGNED
Component: English US → General
Product: Tech Evangelism → Core
blocking2.0: ? → -
Component: General → English US
Product: Core → Tech Evangelism
It doesn't seem to be an issue anymore.
Given Henri contacted, switching to Fixed.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Component: English US → Desktop
Resolution: --- → FIXED
Product: Tech Evangelism → Web Compatibility
You need to log in before you can comment on or make changes to this bug.