ampproject / amp-wp

Enable AMP on your WordPress site, the WordPress way.
https://wordpress.org/plugins/amp/
GNU General Public License v2.0
1.79k stars 383 forks source link

Multiple instances of a unique tag #311

Closed ghost closed 8 years ago

ghost commented 8 years ago

Not sure what to make of it, but getting this in WMT:

Multiple instances of a unique tag: boilerplate (noscript) - old variant, boilerplate (js enabled) - old variant, noscript enclosure for boilerplate

_Here's what I have in the AMP page: _

jery61007 commented 8 years ago

did you try validating your page on browser by adding #development=1 at the end of the url ?? what does the developer console say? I got so many of them before and now it is gradually going away from Webmaster Tool since I updated the custom single.php file.. most of such warning I have are successfully validated on browser console and I can see those errors going away from WMT and numbers of indexed pages increasing.. did you customize your amp page with separate single.php template file from old version of the plugin and you forgot to remove the old boilerplate style from the customized version of your single.php, which since version 0.2 the plugin adds via ''amp_post_template_head" ?? So no longer the boilerplate style in the custom single.php file is needed .. you need to remove it... just read this article Customize AMP for WordPress .... hopefully it helps...

jery61007 commented 8 years ago

I think even Webmaster Tool's validation system is not that perfect either

I have got this error for some pages "Invalid attribute values: type=application/ld+json, rel=canonical, src=https://cdn.ampproject.org/v0.js"

when I checked the source code of the page, there is <link > tag with rel=canonical attribute immediate above the <script > tag that with src=https://cdn.ampproject.org/v0.js" and Webmaster Console is telling me that the rel=canonical is wrongly placed in the script tag... even though that is actually in the <link > tag ... weird behavior... !! so I think your problem will go away unless the issue is what mentioned above ....

ghost commented 8 years ago

Developer console is successful of course, I just thought there was something else, but it seems WMT is being picky. As we go on, I'm sure things will improve from their end as well.

jery61007 commented 8 years ago

That is good... Then you don't need to worry about it, just flush the old caches if you use any caching plugin and the error on Webmaster Console will gradually go away.....

mjangda commented 8 years ago

Can you share a URL to an AMP page?

ghost commented 8 years ago

Sure here's one:

http://www.opptrends.com/2015/07/gopro-inc-gpro-second-quarter-results-exceed-consensus-estimates/amp/

mjangda commented 8 years ago

Checking with the in-browser validator, things turn up fine: http://www.opptrends.com/2015/07/gopro-inc-gpro-second-quarter-results-exceed-consensus-estimates/amp/#development=1

AMP validation successful.