• Resolved Deepak

    (@golinuxcloud)


    Hello Team,

    I am getting this warning in Google Search Console while validating the AMP pages.

    Below snippet is show as the source of the problem
    …..

    <script async custom-element="amp-ad" src="https://cdn.ampproject.org/v0/amp-ad-0.1.js"></script>	
    <style amp-custom>

    …..

    I assume these are expected syntax as the first one is used for Auto ADS from Adsense and the second one is for providing CSS

    Can you please comment if these Warnings can be fixed?

    • This topic was modified 6 years, 1 month ago by Deepak.

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Weston Ruter

    (@westonruter)

    The problem is you have the amp-ad script more than once. Are you manually including the amp-ad script in the template? Do the ads only ever appear in the content?

    Thread Starter Deepak

    (@golinuxcloud)

    Thanks for your quick response Weston

    I think I may have found the source of the problem. I was adding the below function
    <script async custom-element="amp-ad" src="https://cdn.ampproject.org/v0/amp-ad-0.1.js"></script>

    Can you please cross check and confirm once.

    using another plugin. But not sure from where does the first appearance of this function comes from?

    In the page source I see it is under “Rank Math Plugin”

    <!-- /Rank Math WordPress SEO plugin -->
    	<title>Understanding nova compute architecture basics in Openstack (flow chart)</title>
    	<script type='text/javascript' src='https://cdn.ampproject.org/v0.js' async></script>
    <script type='text/javascript' src='https://cdn.ampproject.org/v0/amp-ad-0.1.js' async custom-element="amp-ad"></script>

    Or is it coming from the AMP plugin itself?

    I just want to know the source so that in future I can make sure atleast one entry of this function exists on my page.

    Plugin Author Weston Ruter

    (@westonruter)

    If you are using amp-ad in your content then the AMP plugin will auromatically add the required component script. In native/paired mode, this applies to the entire template not just the content.

    Thread Starter Deepak

    (@golinuxcloud)

    But I am using the classic mode. So how is the component script added automatically?

    I wanted to use the native/paired but there were bunch of errors and my page html was not loading properly and I am no expert so I had to switch to classic.

    Plugin Author Weston Ruter

    (@westonruter)

    It automatically detects the required scripts in the content in classic mode. In paired/native mode it does this for the entire template as well.

    Thread Starter Deepak

    (@golinuxcloud)

    Ok, Thanks for the hint.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘An AMP component ‘script’ tag is present more than once in the document.’ is closed to new replies.