• Resolved ablachman

    (@ablachman)


    Hello there,

    I am using the AMP for wordpress plugin along with a custom WordPress theme, but I am seeing Google Search Console errors for these amp pages. The errors are the following:

    – The text inside tag ‘style amp-custom’ contains ‘CSS i-amphtml- name prefix’, which is disallowed.
    – Multiple image candidates with the same width or pixel density found in attribute ‘srcset’ in tag ‘amp-img’.

    Is it possible this is a bug with the plugin, or that another plugin I am using is introducing this error?

    Thanks for your help.

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

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

    (@westonruter)

    Plugin Author Weston Ruter

    (@westonruter)

    Multiple image candidates with the same width or pixel density found in attribute ‘srcset’ in tag ‘amp-img’.

    I can see this being an issue on this page: https://19thnews.org/2020/08/black-sororities-in-suffrage/?amp

    I’ve never seen that issue before. The issue is with this image:

    <figure class="wp-block-ups-image alignleft portrait">
    	<amp-img class="lazyload amp-wp-enforced-sizes i-amphtml-layout-intrinsic i-amphtml-layout-size-defined" src="https://19thnews.org/wp-content/uploads/2020/08/Eva-Dickerson-DST-IMG_1019-scaled.jpeg" srcset="https://19thnews.org/wp-content/uploads/2020/08/Eva-Dickerson-DST-IMG_1019-225x300.jpeg 225w, https://19thnews.org/wp-content/uploads/2020/08/Eva-Dickerson-DST-IMG_1019-768x1024.jpeg 768w, https://19thnews.org/wp-content/uploads/2020/08/Eva-Dickerson-DST-IMG_1019-150x150.jpeg 150w, https://19thnews.org/wp-content/uploads/2020/08/Eva-Dickerson-DST-IMG_1019-768x1024.jpeg 768w, https://19thnews.org/wp-content/uploads/2020/08/Eva-Dickerson-DST-IMG_1019-1152x1536.jpeg 1152w, https://19thnews.org/wp-content/uploads/2020/08/Eva-Dickerson-DST-IMG_1019-1536x2048.jpeg 1536w, https://19thnews.org/wp-content/uploads/2020/08/Eva-Dickerson-DST-IMG_1019-scaled.jpeg 1920w" data-src="https://19thnews.org/wp-content/uploads/2020/08/Eva-Dickerson-DST-IMG_1019-scaled.jpeg" alt="Eva Dickerson in a ball gown, wearing a crown and sash." data-caption="Eva Dickerson was crowned Miss Spelman shortly before joining Delta." data-credit="(Courtesy of Eva Dickerson)" width="1920" height="2560" layout="intrinsic" i-amphtml-layout="intrinsic">
    		<i-amphtml-sizer class="i-amphtml-sizer">
    			<img alt="" aria-hidden="true" class="i-amphtml-intrinsic-sizer" role="presentation" src="data:image/svg+xml;charset=utf-8,<svg height=&quot;2560&quot; width=&quot;1920&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; version=&quot;1.1&quot;/>">
    		</i-amphtml-sizer>
    		<noscript>
    			<img class="lazyload" src="https://19thnews.org/wp-content/uploads/2020/08/Eva-Dickerson-DST-IMG_1019-scaled.jpeg" sizes="(max-width: 1920px) 100vw, 1920px" srcset="https://19thnews.org/wp-content/uploads/2020/08/Eva-Dickerson-DST-IMG_1019-225x300.jpeg 225w, https://19thnews.org/wp-content/uploads/2020/08/Eva-Dickerson-DST-IMG_1019-768x1024.jpeg 768w, https://19thnews.org/wp-content/uploads/2020/08/Eva-Dickerson-DST-IMG_1019-150x150.jpeg 150w, https://19thnews.org/wp-content/uploads/2020/08/Eva-Dickerson-DST-IMG_1019-768x1024.jpeg 768w, https://19thnews.org/wp-content/uploads/2020/08/Eva-Dickerson-DST-IMG_1019-1152x1536.jpeg 1152w, https://19thnews.org/wp-content/uploads/2020/08/Eva-Dickerson-DST-IMG_1019-1536x2048.jpeg 1536w, https://19thnews.org/wp-content/uploads/2020/08/Eva-Dickerson-DST-IMG_1019-scaled.jpeg 1920w" alt="Eva Dickerson in a ball gown, wearing a crown and sash." width="1920" height="2560">
    		</noscript>
    	</amp-img>
    	<figcaption>Eva Dickerson was crowned Miss Spelman shortly before joining Delta.
    		<cite>(Courtesy of Eva Dickerson)</cite>
    	</figcaption>
    </figure>

    Interestingly, I can see duplicated entry for https://19thnews.org/wp-content/uploads/2020/08/Eva-Dickerson-DST-IMG_1019-768x1024.jpeg 768w in:

    https://19thnews.org/wp-content/uploads/2020/08/Eva-Dickerson-DST-IMG_1019-225x300.jpeg 225w,
    https://19thnews.org/wp-content/uploads/2020/08/Eva-Dickerson-DST-IMG_1019-768x1024.jpeg 768w,
    https://19thnews.org/wp-content/uploads/2020/08/Eva-Dickerson-DST-IMG_1019-150x150.jpeg 150w,
    https://19thnews.org/wp-content/uploads/2020/08/Eva-Dickerson-DST-IMG_1019-768x1024.jpeg 768w,
    https://19thnews.org/wp-content/uploads/2020/08/Eva-Dickerson-DST-IMG_1019-1152x1536.jpeg 1152w,
    https://19thnews.org/wp-content/uploads/2020/08/Eva-Dickerson-DST-IMG_1019-1536x2048.jpeg 1536w,
    https://19thnews.org/wp-content/uploads/2020/08/Eva-Dickerson-DST-IMG_1019-scaled.jpeg 1920w

    I’ve never seen that error before. This is also occurring on the non-AMP version of the page, so the issue appears to be with WordPress. But the AMP plugin should be preventing such an error from leaking onto the frontend. So we will investigate and make sure the image sanitizer is handling this case!

    Plugin Author Weston Ruter

    (@westonruter)

    I have opened an issue to fix this bug to include in the next release of the AMP plugin: https://github.com/ampproject/amp-wp/issues/5358

    Plugin Author Weston Ruter

    (@westonruter)

    – The text inside tag ‘style amp-custom’ contains ‘CSS i-amphtml- name prefix’, which is disallowed.

    None of the three URLs you shared seem to have this problem. Can you find another example?

    Thread Starter ablachman

    (@ablachman)

    @westonruter hi there, thanks for your prompt answer! this is super helpful.

    In terms of this error: The text inside tag ‘style amp-custom’ contains ‘CSS i-amphtml- name prefix’, which is disallowed.

    It shows up in google search console for this url: https://19thnews.org/2020/07/the-group-behind-viral-anti-trump-ads-wants-to-win-in-november-its-hyper-masculine-approach-isnt-helping/?amp.

    Does that help?

    Thanks again!

    Thread Starter ablachman

    (@ablachman)

    @westonruter also, do you have an idea of how the first bug you discussed might be impacting our search results or traffic?

    also, what is the timeline for the next release of the plugin?

    thanks again!

    Plugin Author Weston Ruter

    (@westonruter)

    In terms of this error: The text inside tag ‘style amp-custom’ contains ‘CSS i-amphtml- name prefix’, which is disallowed.

    It shows up in google search console for this url: https://19thnews.org/2020/07/the-group-behind-viral-anti-trump-ads-wants-to-win-in-november-its-hyper-masculine-approach-isnt-helping/?amp.

    I’m not seeing a validation error any longer for that URL, as you can see here: https://playground.amp.dev/?url=https%3A%2F%2F19thnews.org%2F2020%2F07%2Fthe-group-behind-viral-anti-trump-ads-wants-to-win-in-november-its-hyper-masculine-approach-isnt-helping%2F%3Famp

    Could it be that a fix was put in place which hasn’t been crawled yet?

    Otherwise, this is essentially a known issue where if you use i-amphtml- in your CSS that this fails to get sanitized by the AMP plugin and is leaked externally. See https://github.com/ampproject/amp-wp/issues/771

    We’re planning to fix this in the next major release (v2.1) sometime in the next couple months.

    also, do you have an idea of how the first bug you discussed might be impacting our search results or traffic?

    It just means that the AMP version won’t be presented in search results. The non-AMP version will be shown on mobile search results.

    also, what is the timeline for the next release of the plugin?

    Either this week or next. Here is what we currently have tagged for 2.0.2: https://github.com/ampproject/amp-wp/milestone/42

    Plugin Author Weston Ruter

    (@westonruter)

    @ablachman We have a 2.0.2 pre-release build which is available for you to test if you are willing. It should fix both of the issues that you have reported here.

    You can find the latest 2.0 production build linked to here: https://github.com/ampproject/amp-wp/wiki/Development-Builds

    Thread Starter ablachman

    (@ablachman)

    @westonruter I am just seeing this. We are planning to update our plugin today. Does that mean the bug fixes mentioned here should be part?

    Plugin Author Weston Ruter

    (@westonruter)

    Yes, those fixes were released a few weeks ago.

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

The topic ‘Google Search Console errors for AMP’ is closed to new replies.