Closed zhouyx closed 3 years ago
Shouldn't this be higher priority? It's breaking existing implementations of amp-ad that rely on fallback and collapsing?
@aghassemi
no creatives in production right now is using the messaging API, so it's not uncovered until now
Oh? Maybe I'm seeing something else, then.
https://ampbyexample.com/components/amp-ad/#using-placeholders
Notice that the fallback doesn't work. I see that DFP is returning an effectively blank ad:
<html><body style="background-color:transparent"></body></html>
Which is then dutifully copied to the iframe.
In a test of collapsing (same ad without the <div fallback>
) the iframe doesn't collapse. So i'm assuming that somewhere between DFP implementation, amp ad (and maybe the amp runtime) something has regressed recently. I came across this issue so figured that was it. Is it not related?
@jamesshannon This is not related to the bug here. This bug is about an AMP ad fallback to render in cross origin iframe case. Not the fallback element.
Whether to collapse the ad iframe or display the fallback element, depends on whether the ad is in viewport or not. We only try to collapse the iframe if it is not in viewport.
BTW https://ampbyexample.com/components/amp-ad/#using-placeholders The fallback works for me. Could you provide more information here? Thanks.
It's not showing the fallback for me -- just an iframe body with a transparent background.
(This behavior was initially reported by Lonely Planet, so I don't think it's just me.)
I don't know enough about doubleclick impl or amp-ad to figure out which layer isn't working. While I would expect that the ad would collapse as long as it's not above the viewport ("AMP determines that this operation can be performed without affecting the user's scroll position"), but in any case the fact that <amp-ad>
seems to be unaware to even show the fallback seems to me to suggest that that's not the issue.
This issue hasn't been updated in awhile. @bradfrizzell Do you have any updates?
This issue hasn't been updated in awhile. @bradfrizzell Do you have any updates?
@jamesshannon Is this still a problem for you?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
Please check the fallback example in https://github.com/ampproject/amphtml/blob/master/test/manual/amp-animation/scrollbound-embeds.amp.html#L62
Messaging between iframe and parent AMP document doesn't work because the
sentinel
is not matched.We have our logic to check for
sentinel
inwindow.name
, and if not found generate a random one. It seems that the safeframe script always removewindow.name
, and thus the script in iframe can not get correct sentinelcc @lannka