You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the sizeMapping array in window.dfw, each individual mapping takes the form of an object/associative array with the keys browser and ad_sizes. Here's what jquery.dfp.js' docs say the plugin expects:
Because non-lazyload widgets are initialized off of jQuery('.dfw-unit:not(.dfw-lazy-load)').dfp( window.dfw ); directly, there's no sizeMapping key set to provide sizes there.
Lazyload widgets are initialized off of window.dfp_options, which is modified from window.dfw:
benlk
changed the title
non-lazyload ads are being loaded with incomplete options settings, and the mapping array
non-lazyload ads are being loaded with incomplete options settings, and the mapping object's ad_sizes array is misformatted
Feb 7, 2019
benlk
linked a pull request
Feb 7, 2019
that will
close
this issue
In the sizeMapping array in
window.dfw
, each individual mapping takes the form of an object/associative array with the keysbrowser
andad_sizes
. Here's what jquery.dfp.js' docs say the plugin expects:Here's what this plugin is outputting upon the page, cleaned up to match the formatting:
Two things are wrong here:
mappings
is notsizeMapping
jQuery('.dfw-unit:not(.dfw-lazy-load)').dfp( window.dfw );
directly, there's no sizeMapping key set to provide sizes there.Lazyload widgets are initialized off of
window.dfp_options
, which is modified fromwindow.dfw
:doubleclick-for-wp/js/jquery.dfw.js
Lines 35 to 39 in f73e00d
There are several aspects to the fix for this:
sizeMapping
rather than'mappings'
As a temporary fix, sites affected can check the box to enable lazy-load for all widgets.
The text was updated successfully, but these errors were encountered: