Closed benlk closed 7 years ago
We're going to want a dump of the $args here: https://github.com/INN/DoubleClick-for-WordPress/blob/master/dfw-init.php#L103-L112
And a dump of what's actually coming out of new DoubleClickBreakpoint
here: https://github.com/INN/DoubleClick-for-WordPress/blob/master/dfw-init.php#L122
A dump of what's coming out of new DoubleClickBreakpoint, which appears to indicate that the functionallity converting the objects to JSON is what's breaking the maxWidth
, because the __set_state
array is correct.
DoubleClickBreakpoint::__set_state(array(\n 'identifier' => 'xl',\n 'minWidth' => '1220',\n 'maxWidth' => '9999',\n 'option' => true,\n))
DoubleClickBreakpoint::__set_state(array(\n 'identifier' => 'desktop',\n 'minWidth' => '1040',\n 'maxWidth' => '1219',\n 'option' => true,\n))
DoubleClickBreakpoint::__set_state(array(\n 'identifier' => 'tablet',\n 'minWidth' => '720',\n 'maxWidth' => '1039',\n 'option' => true,\n))
DoubleClickBreakpoint::__set_state(array(\n 'identifier' => 'phone',\n 'minWidth' => '0',\n 'maxWidth' => '719',\n 'option' => true,\n))
This is where the 1
is coming from: https://github.com/INN/DoubleClick-for-WordPress/blob/master/dfw-init.php#L385
And reading between the lines of https://developers.google.com/doubleclick-gpt/reference#googletag.SizeMappingBuilder, the fiewport size is a minimum, so 1
is a minimum viewport-height of 1. I'm not sure what's making it invalid now. Does string '1'
work?
Nope, string '1'
does not work.
Warning Start Invalid arguments: SizeMappingBuilder.addSize(['1220', '1'], [[728, 90]])
Warning Start Invalid arguments: SizeMappingBuilder.addSize(['1040', '1'], [[728, 90]])
Warning Start Invalid arguments: SizeMappingBuilder.addSize(['720', '1'], [[320, 50]])
Warning Start Invalid arguments: SizeMappingBuilder.addSize(['0', '1'], [[320, 50]])
So is it the [[320,50]]
double-bracketed array of arrays?
Warning 1 ms Invalid arguments: SizeMappingBuilder.addSize(['1220', '1'], [728, 90])
Warning 1 ms Invalid arguments: SizeMappingBuilder.addSize(['1040', '1'], [728, 90])
Warning 1 ms Invalid arguments: SizeMappingBuilder.addSize(['720', '1'], [320, 50])
Warning 1 ms Invalid arguments: SizeMappingBuilder.addSize(['0', '1'], [320, 50])
Nope.
Maybe it's because those are strings instead of ints?
Here's the full set of logs as seen in
?googlfc
:Ads are failing to load, apparently because something is wrong with the arguments being passed to googletag.SizeMappingBuilder.addSize.
Is this because of a configuration error with the widget, or because of something actually being different?