Support » Plugin: AMP for WordPress » how to refresh noscript

  • Resolved facem Web

    (@shojikama)


    Hi,
    since a mounth, Google search console does take a look in the noscript tags. This situation can give some issues like the sizes attribute, attribute that is not recognized for amp google usage.

    I removed the sizes attribute with a script, but he is still present in the noscript tag. How can I refresh the noscript tags, it doens’t workk by refreshing the cache.

    Thanks

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

    (@westonruter)

    Please share the URL to an AMP page on your site that has the problem.

    https://facemweb.com/wordpress/plugins/login-logout-register-menu/amp
    here it is

    <noscript><img class="wp-image-2282 aligncenter" src="https://wordpress.facemweb.com/wp-content/uploads/2017/11/Capture2-300x115.jpg" alt="Login Logout Register Menu 2" width="373" height="143" srcset="https://wordpress.facemweb.com/wp-content/uploads/2017/11/Capture2-300x115.jpg 300w, https://wordpress.facemweb.com/wp-content/uploads/2017/11/Capture2-768x293.jpg 768w, https://wordpress.facemweb.com/wp-content/uploads/2017/11/Capture2-1024x391.jpg 1024w, https://wordpress.facemweb.com/wp-content/uploads/2017/11/Capture2.jpg 1344w" sizes="(max-width: 373px) 100vw, 373px" /></noscript>

    Plugin Support Ryan Kienstra

    (@ryankienstra)

    Hi @shojikama,
    Thanks for bringing this up.

    This looks to be an issue with the plugin’s <noscript> sanitization, which is tracked here:
    https://github.com/Automattic/amp-wp/issues/1032

    Until a fix is deployed, is the site using WP Rocket for lazy-loading, by chance? The <noscript> tag is often from lazy-loading, and there are references to plugins/wp-rocket/ in the non-AMP page source. This is only a guess, though.

    If it is, maybe there would be a way to only output the <noscript> if:

    
    ( ! function_exists( 'is_amp_endpoint' ) || ! is_amp_endpoint() )
    

    That conditional is true only on non-AMP pages.

    • This reply was modified 1 month, 3 weeks ago by  Ryan Kienstra.
Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.