Prebid.js icon indicating copy to clipboard operation
Prebid.js copied to clipboard

Bug New Rubicon Adapter

Open Deimos01 opened this issue 10 years ago • 6 comments

Hi,

I just discovered a bug for the new Rubicon adapter. When rubicon is winning the bid, they can't render and display the ads on the websites who are using prebid in multiple iframes (adserver, adnetwork ...) . We have an error in the console :

Uncaught TypeError : Cannot read property 'renderCreative' of undefined

So i remplaced this line :

;(function (w, fe) { w.rubicontag.renderCreative(fe, "XXXX", "XX"); }(window.top, (document.body || document.documentElement))); By :

;(function (w, fe) { w.rubicontag.renderCreative(fe, "XXXX", "XX"); }(parent.window, (document.body || document.documentElement)));

parent.window instead of window.top line 216 in prebid.js

It's working and I think it's better (iframe or not).

Thank you,

Deimos01 avatar Mar 16 '16 17:03 Deimos01

@Deimos01 Thanks for bug report. This change looks good to me. @bretg mind taking a look as well.

mkendall07 avatar Mar 17 '16 20:03 mkendall07

Good catch - thanks @Deimos01. Working with the team to test a more robust approach. Hope to have a pull request in the next day or two.

bretg avatar Mar 22 '16 12:03 bretg

@mkendall07 -- pull request 265

bretg avatar Mar 22 '16 15:03 bretg

PR #265 has been merged to master manually with this commit. Closing.

protonate avatar Mar 29 '16 17:03 protonate

Reopening, will close with release of v0.8.0.

protonate avatar Apr 08 '16 00:04 protonate

Released with 0.8.0

protonate avatar Apr 15 '16 21:04 protonate