• Resolved shaboneh

    (@shaboneh)


    hi

    This shows error for all pages of my site:

    I chose different templates for the site, but this error is still taken by the plugin.

    I know this is a tag html but I don’t know how to fix it.

    Please help me

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

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

    (@westonruter)

    This is a known issue. We were blocked on an upstream AMP spec update, which I can see now has been done. You can follow https://github.com/ampproject/amp-wp/issues/7601 for updates.

    Thread Starter shaboneh

    (@shaboneh)

    Thanks for the tip.
    What should I do to fix this error?

    Plugin Author Weston Ruter

    (@westonruter)

    You can just ignore it.

    Otherwise, you can suppress it from being reported in the first place using the amp_validation_error_sanitized filter (docs). For example:

    add_filter(
    	'amp_validation_error_sanitized',
    	static function ( $sanitized, $error ) {
    		if (
    			'DISALLOWED_ATTR' === $error['code'] &&
    			'fetchpriority' === $error['node_name']
    		) {
    			$sanitized = true;
    		}
    		return $sanitized;
    	},
    	10,
    	2
    );

    This can go in a custom plugin or your theme’s functions.php.

    Thread Starter shaboneh

    (@shaboneh)

    Thank you so much. If you suggest that we ignore this error, I prefer to listen to you

    This error does not affect the index of our pages in Google?

    Because we have installed “AMP” to increase the attention of Google

    Plugin Author Weston Ruter

    (@westonruter)

    The AMP plugin identifies the error but it still sanitizes the markup to be valid AMP. So it doesn’t impact AMP validity. It’s more for your information to let you know it is removing something from your markup which you may have wanted.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘[NSFW] fetchpriority=”high” error’ is closed to new replies.