amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

Yieldbot ad, multiSize attribute console error

Open elljoh opened this issue 9 years ago • 0 comments

What's the issue?

The data attribute claim here is correct, but the Yieldbot amp-ad type logs errors (asynchronously as expected) for unknown doubleclick() data attributes.

e.g.

Uncaught Error: Unknown attribute for yieldbot: multiSize.
    at validateAllowedFields (integration.js:301)
    at Object.validateData (integration.js:249)
    at yieldbot (integration.js:10705)
    at Object.run (integration.js:76)
    at draw3p (integration.js:2033)
    at window.draw3p (integration.js:2081)
    at frame.max.html:9

Requests to Yieldbot and Doubleclick still occur; fortunately, due to the validation error being added to the event queue for subsequent processing.

How do we reproduce the issue?

  1. Change test/manual/amp-ad.yieldbot.amp.html#L25-L31 to include the attribute, data-multi-size="300x200"

e.g.

  <amp-ad width="300" height="250"
          type="yieldbot"
          data-psn="1234"
          data-yb-slot="medrec"
          data-slot="/2476204/medium-rectangle"
          data-multi-size="300x200"
          json='{"targeting":{"category":["food","lifestyle"]},"categoryExclusions":["health"]}'>
  </amp-ad>
  1. gulp default
  2. Open devtools and hit the local server, http://localhost:8000/test/manual/amp-ad.yieldbot.amp.html

What browsers are affected?

  • All

Which AMP version is affected?

The Yieldbot amp-ad has some brittle code where it re-specified the doubleclick() ad attributes as optional; therefore, the issue would have existed since 4ebbc257.

  • However, the bug does not have presented itself until data attributes were specified in the Yieldbot amp-ad outside of those available in the optional set.

elljoh avatar Jul 20 '17 15:07 elljoh