• Resolved keshavgupta

    (@keshavgupta)


    Hi,

    I got this error “The parent tag of tag ‘noscript enclosure for boilerplate’ is ‘noscript’, but it can only be ‘head'” When I will check in AMP validator extension.

    Another error “Tag ‘html’ marked with attribute ‘data-ampdevmode’. Validator will suppress errors regarding any other tag with this attribute.”

    Can you please help me with this?

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

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

    (@milindmore22)

    Hello @keshavgupta

    Thanks for the support topic, It seems litespeed cache is injecting additional noscripts tags in images and also adding lazyloading scripts.

    The simple solution for this will be adding the following code snippet in your active themes functions.php or download and install this plugin.

    
    /**
     * Disabled optimization for HTML, CSS and JS.
     */
    function amp_litespeed_compat() {
    
    	if ( function_exists( 'amp_is_request' ) && amp_is_request() ) {
    		define( 'LITESPEED_BYPASS_OPTM', true );
    		add_filter( 'litespeed_can_optm', '__return_false' );
    	}
    
    }
    
    add_action( 'wp', 'amp_litespeed_compat' );
    

    Once added check your site using AMP validator and let me know if that resolves your issue.

    Thread Starter keshavgupta

    (@keshavgupta)

    You are amazing. This issue has been resolved.

    Now I got this error message “Tag ‘html’ marked with attribute ‘data-ampdevmode’. Validator will suppress errors regarding any other tag with this attribute.”

    and 8 157 The script tag contains invalid JSON that cannot be parsed.

    Please provide the solution for the same

    Plugin Support Milind More

    (@milindmore22)

    Hello @keshavgupta

    This validation error should only show up logged-in when the admin bar is shown. This is working normally. If it is appearing when not being logged-in, then that would be a problem.

    I assume you’re getting the error via the AMP Validator extension?

    Note that Googlebot and other crawlers will never be logged-in, so they will never encounter the data-ampdevmode attribute.

    You can recheck your site on AMP validator, OR log out from the site and the AMP validator extension will display validation correctly.

    Thread Starter keshavgupta

    (@keshavgupta)

    Thank you so much… All set now.

    Plugin Support Milind More

    (@milindmore22)

    @keshavgupta
    I have opened a PR to address the issue in the lightspeed cache plugin. subscribe to this PR to get updates https://github.com/litespeedtech/lscache_wp/pull/346

    I’ll mark this as resolved. Feel free to open a new support topic if you require any further assistance.

    Thread Starter keshavgupta

    (@keshavgupta)

    Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘‘noscript enclosure for boilerplate’ is ‘noscript’’ is closed to new replies.