• Resolved x0ff

    (@x0ff)


    hi,
    Just to let you know that your plugin is show errors(AMP validation) on all external pages. The errors start on update other plugin(nextscripts 4.3.23) any days ago.
    https://ibb.co/Zhcskt6

    on nextscripts support answered me this:
    “Well, there is no way for us to fix this.

    But the good news is – this is a “false positive”.

    SNAP adds some Javascript code to the top “admin panel”. This code is loaded only when you logged as an admin. Which means you real AMP visitors won’t get this script and this error. Your validator is not smart enough to see that and since you are ruining it as an admin, it reports an error.”

    you can check the original msg :
    https://www.ads-software.com/support/topic/amp-error-on-4-3-23/

    can you correct this “false positive”? Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Milind More

    (@milindmore22)

    Hello @x0ff

    Thank you for the support topic, The AMP pages do not allow custom javascript being added so the AMP plugin’s validator removes them for you to create a valid AMP page.

    We agree with Nextscript support, if they are not vital to function your site you can ignore them.

    Unfortunately, it’s something we can’t correct within the AMP plugin, this has to be corrected in the plugins which are adding scripts, they need to add or dequeue scripts conditionally by detecting if the current endpoint is AMP endpoint.

    eg:

    
    if ( function_exists( 'is_amp_endpoint' ) && ! is_amp_endpoint() ) {
        // Enqueue scripts here.
    }
    
    Plugin Author Weston Ruter

    (@westonruter)

    NextScripts could also fix the issue by adding the data-ampdevmode attribute to the scripts they add to the page when is_amp_endpoint() returns true. Read more at https://weston.ruter.net/2019/09/24/integrating-with-amp-dev-mode-in-wordpress/

    Thread Starter x0ff

    (@x0ff)

    I will write to support so that they can make the corrections, thanks

    Plugin Support Milind More

    (@milindmore22)

    Hello @x0ff

    Since the issue is not with AMP plugin I’ll mark this as resolved. Feel free to open a new support topic if you require any further assistance.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘false positive’ is closed to new replies.