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

    (@westonruter)

    Are you manually adding the amp-social-share script via a plugin action? If so, you should switch to using a filter to prevent duplicates like this from happening. See: https://www.ads-software.com/support/topic/the-tag-amp-ad-extension-js-script-appears-more-than-once-in-the-document/#post-10262578

    Thanks Weston. We are facing the same issue on this script, as well as others that are popping as being inserted twice, while checking our template we only see the script code once. We’ll try the recommendation of using filters.

    We love AMP HTML. It would be awesome if it could mature without introducing breaking changes. At implementation time site owners put lots of effort in making a template that looks good and is 100% compliant, then over time soft errors show, multiply, and become hard errors without making a change to the template. The combination of being strict and drifting seems like a roadblock to adoption, and we hope that at some point things stabilize to the point we can run AMP as easily as standard HTML and javascript

    Thread Starter yunysia

    (@yunysia)

    Hi again, thanks for your fast answer!

    I didn’t add anything manually and the filter didn’t work for me ):

    Plugin Author Weston Ruter

    (@westonruter)

    @yunysia In looking at your source code, I see these two scripts:

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

    <script type='text/javascript' src='https://cdn.ampproject.org/v0/amp-ad-latest.js' async custom-element="amp-social-share"></script>

    Notice how the second one is for amp-social-share but it is linking to amo-ad-latest.js. I suspect there is some plugin or theme code that is adding these.

    @pro99 Your concerns are being addressed with the push to having full amp theme compatibility in v0.7 and in the upcoming v1.0. The need to inject the scripts at all is eliminate in v0.7 when using amp theme support, as the component scripts will be automatically added for you.

    Thread Starter yunysia

    (@yunysia)

    Indeed, my theme was adding the code! Fixed it now, thanks for your help.

    The tag ‘amp-ad extension .js script’ appears more than once in the document. This will soon be an error.

    
    /><script async custom-element="amp-ad" src="https://cdn.ampproject.org/v0/amp-ad-0.1.js"></script><style amp-custom>.alignright{float:right}.alignleft{float:left}.aligncenter{display:block;margin-left:auto;margin-right:auto}.amp-wp-enforced-sizes{max-width:100%;margin:0

    I also use adinsert. How do I resolve this issue?

    Also I have Error in required structured data element

    A value for the logo field is required. — but I have a feature picture on my posts

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘The tag ‘amp-social-share extension.js script’ appears more than once’ is closed to new replies.