How to fix amp-auto-ads on WordPress with with Error “Cannot resize element and overflow is not available”

半世苍凉 提交于 2019-12-12 18:27:08

问题


I am using Google AdSense Auto-Ads for AMP an a WordPress Website. I placed the required snippet in the -Tag as well as the -Tag of the AMPHTML-page. Just as required by Google. And it worked quite well. Until a couple of days ago. AMP Auto-Ads stopped showing on AMP-Pages.

In the console I am getting the following error:

  • No anchor element found
  • Cannot resize element and overflow is not available

The amp-ad is showing with height="0" with seems odd to me. As shown in the screenshot and code below.

https://imgur.com/a/g2Gl0op

That's the link to my website and one of the not working AMP-pages:

https://www.randombrick.de/vpn-und-tor-zusammen-nutzen/amp/

  • I validated the website via https://validator.ampproject.org and now issues so far.
  • I switch the AMP WordPress Plugin from AMP to AMP for WordPress
  • I tried to inject the code using the functions.php but switched back to AMP for WordPress Plugin.
  • I cleared the cache using W3 Total Cache
  • I deactivated each WordPress Plugin step by step, cleared the cache but couldn't find any plugin blocking the ads

I am actually lost and don't know what causes the AMP-Auto-Ads to collapse. Especially since it worked for weeks.

Does anyone have any idea why theses ads won't show? Apparently the amp-auto-ad code is within the AMP-page. But the ads won't appear.

来源:https://stackoverflow.com/questions/55426552/how-to-fix-amp-auto-ads-on-wordpress-with-with-error-cannot-resize-element-and

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!