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:
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
:https://github.com/INN/doubleclick-for-wp/blob/f73e00d5cf8897fd75706453986b21a0e6e4a8a2/js/jquery.dfw.js#L35-L39
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.