Fixing AMP Issues in a WordPress site

wordpress

#1

How can I resolve AMP issues that Google Search Console is reporting in my Wordpress blog? It looks like stuff that isn’t part of my blog posts. Here are my 8 issues that it found:

The tag ‘script’ is disallowed except in specific forms. 24
The mandatory tag ‘amphtml engine v0.js script’ is missing or incorrect. 24
User-authored JavaScript found on page: The attribute ‘src’ in tag ‘amp-audio extension .js script’ is set to an invalid value 4
The tag ‘amp-audio’ requires including the ‘amp-audio’ extension JavaScript. 3
User-authored JavaScript found on page: The attribute ‘src’ in tag ‘amp-youtube extension .js script’ is set to an invalid value 2
The tag ‘amp-youtube extension .js script’ is missing or incorrect, but required by ‘amp-youtube’. 2
Invalid URL protocol for AMP attribute ‘src’ in tag ‘amp-audio > source’ 1
The tag ‘amp-audio extension .js script’ is missing or incorrect, but required by ‘amp-audio’. 1

Thank you


#2

Hard to give a straight answer since you omitted important pieces. How is your wordpress configured? How are you trying to implement AMP? From the errors you pasted it looks like your WordPress theme is not optimized for AMP, it’s using tags that are not valid for that format. Maybe share the URL of the pages you’re testing so others can give a look at it.


#3

My Wordpress install is a “One-click install” from Dreamhost. I am using the AMP plugin from Automattic. I am using the Twenty Seventeen theme that came with WordPress.

There are 28 pages with issues. Here are the pages with “The tag ‘script’ is disallowed except in specific forms.”:
1 https://blog.mikepolinske.info/2017/08/01/nozomi-hope-our-daily-bread/amp/ 1 Aug 7, 2017 
2 https://blog.mikepolinske.info/2017/07/28/forgiven-our-daily-bread/amp/ 1 Aug 6, 2017 
3 https://blog.mikepolinske.info/2017/07/29/privileged-access-our-daily-bread/amp/ 1 Aug 6, 2017 
4 https://blog.mikepolinske.info/2017/08/06/youversion-verse-of-the-day-august-6-2017/amp/ 1 Aug 6, 2017 
5 https://blog.mikepolinske.info/2017/08/06/time-of-grace-a-roman-and-a-jew/amp/ 1 Aug 6, 2017 
6 https://blog.mikepolinske.info/2017/06/07/understanding-your-emotions-part-2-joyce-meyer-ministries-tv-podcast-2/amp/ 1 Jun 25, 2017 
7 https://blog.mikepolinske.info/2017/05/31/healing-the-soul-of-a-woman-part-3-joyce-meyer-radio-podcast/amp/ 1 Jun 25, 2017 
8 https://blog.mikepolinske.info/2017/05/31/the-beauty-of-brokenness-our-daily-bread/amp/ 1 Jun 25, 2017 
9 https://blog.mikepolinske.info/2017/05/30/expect-and-extend-mercy-our-daily-bread/amp/ 1 Jun 25, 2017 
10 https://blog.mikepolinske.info/2017/05/30/meditation-gives-hope-when-the-outlook-is-bleak-faithgateway/amp/ 1 Jun 25, 2017 
11 https://blog.mikepolinske.info/2017/06/25/time-of-grace-i-feel-so-sad/amp/ 1 Jun 25, 2017 
12 https://blog.mikepolinske.info/2017/06/06/fifteen-minute-challenge-our-daily-bread/amp/ 1 Jun 25, 2017 
13 https://blog.mikepolinske.info/2017/06/20/jesus-heals-our-broken-hearts-faithgateway-2/amp/ 1 Jun 20, 2017 
14 https://blog.mikepolinske.info/2017/06/17/gods-gift-of-laughter-faithgateway/amp/ 1 Jun 17, 2017 
15 https://blog.mikepolinske.info/2017/06/16/made-alive-our-daily-bread/amp/ 1 Jun 17, 2017 
16 https://blog.mikepolinske.info/2017/06/15/vidangel-watch-however-the-bleep-you-want/amp/ 1 Jun 17, 2017 
17 https://blog.mikepolinske.info/2017/06/13/time-of-grace-the-word/amp/ 1 Jun 14, 2017 
18 https://blog.mikepolinske.info/2017/06/11/united-by-one-love-the-upper-room/amp/ 1 Jun 11, 2017 
19 https://blog.mikepolinske.info/2017/06/09/time-of-grace-i-need-proof/amp/ 1 Jun 10, 2017 
20 https://blog.mikepolinske.info/2017/06/10/prayer-climbing-the-mountain-faithgateway/amp/ 1 Jun 10, 2017 
21 https://blog.mikepolinske.info/2017/06/10/time-of-grace-care-for-the-weak/amp/ 1 Jun 10, 2017 
22 https://blog.mikepolinske.info/2017/06/10/waving-the-flag-the-upper-room/amp/ 1 Jun 10, 2017 
23 https://blog.mikepolinske.info/2017/06/08/creating-a-sun-delay-faithgateway/amp/ 1 Jun 9, 2017 
24 https://blog.mikepolinske.info/2017/06/08/keeping-god-first-part-1-joyce-meyer-ministries-tv-podcast-2/amp/ 1 Jun 8, 2017 
25 https://blog.mikepolinske.info/2017/06/08/do-we-have-free-will-in-heaven-youtube/amp/ 1 Jun 8, 2017 
26 https://blog.mikepolinske.info/2017/06/07/time-of-grace-first-the-cross-then-the-crown/amp/ 1 Jun 8, 2017 
27 https://blog.mikepolinske.info/2017/06/06/matter-of-trust-june-6-2017-wels/amp/ 1 Jun 7, 2017 
28 https://blog.mikepolinske.info/2017/06/06/are-you-going-to-heaven-youtube/amp/ 1 Jun 6, 2017

Here are the page with "The mandatory tag ‘amphtml engine v0.js script’ is missing or incorrect."
1 https://blog.mikepolinske.info/2017/08/01/nozomi-hope-our-daily-bread/amp/ 1 Aug 7, 2017 
2 https://blog.mikepolinske.info/2017/07/28/forgiven-our-daily-bread/amp/ 1 Aug 6, 2017 
3 https://blog.mikepolinske.info/2017/07/29/privileged-access-our-daily-bread/amp/ 1 Aug 6, 2017 
4 https://blog.mikepolinske.info/2017/08/06/youversion-verse-of-the-day-august-6-2017/amp/ 1 Aug 6, 2017 
5 https://blog.mikepolinske.info/2017/08/06/time-of-grace-a-roman-and-a-jew/amp/ 1 Aug 6, 2017 
6 https://blog.mikepolinske.info/2017/06/07/understanding-your-emotions-part-2-joyce-meyer-ministries-tv-podcast-2/amp/ 1 Jun 25, 2017 
7 https://blog.mikepolinske.info/2017/05/31/healing-the-soul-of-a-woman-part-3-joyce-meyer-radio-podcast/amp/ 1 Jun 25, 2017 
8 https://blog.mikepolinske.info/2017/05/31/the-beauty-of-brokenness-our-daily-bread/amp/ 1 Jun 25, 2017 
9 https://blog.mikepolinske.info/2017/05/30/expect-and-extend-mercy-our-daily-bread/amp/ 1 Jun 25, 2017 
10 https://blog.mikepolinske.info/2017/05/30/meditation-gives-hope-when-the-outlook-is-bleak-faithgateway/amp/ 1 Jun 25, 2017 
11 https://blog.mikepolinske.info/2017/06/25/time-of-grace-i-feel-so-sad/amp/ 1 Jun 25, 2017 
12 https://blog.mikepolinske.info/2017/06/06/fifteen-minute-challenge-our-daily-bread/amp/ 1 Jun 25, 2017 
13 https://blog.mikepolinske.info/2017/06/20/jesus-heals-our-broken-hearts-faithgateway-2/amp/ 1 Jun 20, 2017 
14 https://blog.mikepolinske.info/2017/06/17/gods-gift-of-laughter-faithgateway/amp/ 1 Jun 17, 2017 
15 https://blog.mikepolinske.info/2017/06/16/made-alive-our-daily-bread/amp/ 1 Jun 17, 2017 
16 https://blog.mikepolinske.info/2017/06/15/vidangel-watch-however-the-bleep-you-want/amp/ 1 Jun 17, 2017 
17 https://blog.mikepolinske.info/2017/06/13/time-of-grace-the-word/amp/ 1 Jun 14, 2017 
18 https://blog.mikepolinske.info/2017/06/11/united-by-one-love-the-upper-room/amp/ 1 Jun 11, 2017 
19 https://blog.mikepolinske.info/2017/06/09/time-of-grace-i-need-proof/amp/ 1 Jun 10, 2017 
20 https://blog.mikepolinske.info/2017/06/10/prayer-climbing-the-mountain-faithgateway/amp/ 1 Jun 10, 2017 
21 https://blog.mikepolinske.info/2017/06/10/time-of-grace-care-for-the-weak/amp/ 1 Jun 10, 2017 
22 https://blog.mikepolinske.info/2017/06/10/waving-the-flag-the-upper-room/amp/ 1 Jun 10, 2017 
23 https://blog.mikepolinske.info/2017/06/08/creating-a-sun-delay-faithgateway/amp/ 1 Jun 9, 2017 
24 https://blog.mikepolinske.info/2017/06/08/keeping-god-first-part-1-joyce-meyer-ministries-tv-podcast-2/amp/ 1 Jun 8, 2017 
25 https://blog.mikepolinske.info/2017/06/08/do-we-have-free-will-in-heaven-youtube/amp/ 1 Jun 8, 2017 
26 https://blog.mikepolinske.info/2017/06/07/time-of-grace-first-the-cross-then-the-crown/amp/ 1 Jun 8, 2017 
27 https://blog.mikepolinske.info/2017/06/06/matter-of-trust-june-6-2017-wels/amp/ 1 Jun 7, 2017 
28 https://blog.mikepolinske.info/2017/06/06/are-you-going-to-heaven-youtube/amp/ 1 Jun 6, 2017

Here are the pages with “User-authored JavaScript found on page: The attribute ‘src’ in tag ‘amp-audio extension .js script’ is set to an invalid value”:
1 https://blog.mikepolinske.info/2017/08/01/nozomi-hope-our-daily-bread/amp/ 1 Aug 7, 2017 
2 https://blog.mikepolinske.info/2017/07/28/forgiven-our-daily-bread/amp/ 1 Aug 6, 2017 
3 https://blog.mikepolinske.info/2017/07/29/privileged-access-our-daily-bread/amp/ 1 Aug 6, 2017 
4 https://blog.mikepolinske.info/2017/05/31/the-beauty-of-brokenness-our-daily-bread/amp/ 1 Jun 25, 2017 
5 https://blog.mikepolinske.info/2017/05/30/expect-and-extend-mercy-our-daily-bread/amp/ 1 Jun 25, 2017 
6 https://blog.mikepolinske.info/2017/06/06/fifteen-minute-challenge-our-daily-bread/amp/ 1 Jun 25, 2017 
7 https://blog.mikepolinske.info/2017/06/16/made-alive-our-daily-bread/amp/ 1 Jun 17, 2017 
8 https://blog.mikepolinske.info/2017/06/06/matter-of-trust-june-6-2017-wels/amp/ 1 Jun 7, 2017 

Here are the pages with “The tag ‘amp-audio’ requires including the ‘amp-audio’ extension JavaScript.”:
1 https://blog.mikepolinske.info/2017/08/01/nozomi-hope-our-daily-bread/amp/ 1 Aug 7, 2017 
2 https://blog.mikepolinske.info/2017/07/28/forgiven-our-daily-bread/amp/ 1 Aug 6, 2017 
3 https://blog.mikepolinske.info/2017/07/29/privileged-access-our-daily-bread/amp/ 1 Aug 6, 2017 
4 https://blog.mikepolinske.info/2017/05/31/the-beauty-of-brokenness-our-daily-bread/amp/ 1 Jun 25, 2017 
5 https://blog.mikepolinske.info/2017/05/30/expect-and-extend-mercy-our-daily-bread/amp/ 1 Jun 25, 2017 
6 https://blog.mikepolinske.info/2017/06/06/fifteen-minute-challenge-our-daily-bread/amp/ 1 Jun 25, 2017 
7 https://blog.mikepolinske.info/2017/06/16/made-alive-our-daily-bread/amp/ 1 Jun 17, 2017 

And finally, here are the pages with “User-authored JavaScript found on page: The attribute ‘src’ in tag ‘amp-youtube extension .js script’ is set to an invalid value”:
1 https://blog.mikepolinske.info/2017/06/08/do-we-have-free-will-in-heaven-youtube/amp/ 1 Jun 8, 2017 
2 https://blog.mikepolinske.info/2017/06/06/are-you-going-to-heaven-youtube/amp/ 1 Jun 6, 2017 

I am using the following plugins:

Akismet Anti-Spam
Version 3.3.4 | By Automattic | View details

All 404 Redirect to Homepage
Version 1.7 | By Fakhri Alsadi | View details

All In One WP Security
Version 4.2.8 | By Tips and Tricks HQ, Peter, Ruhul, Ivy | View details

AMP
Version 0.5 | By Automattic | View details

Clean My Archives
Version 1.0.0 | By Justin Tadlock | View details

Code Embed
Version 2.2.2 | By David Artiss | View details | Support

Glue for Yoast SEO & AMP
Version 0.4.2 | By Joost de Valk | View details

Jetpack by WordPress.com
Version 5.2.1 | By Automattic | View details

Medium
Version 1.4.0 | By A Medium Corporation | View details

RefTagger
Version 2.0.3 | By Logos Bible Software | View details

RefTagger Shortcode
Version 1.1 | By Ken Charity | View details

Speed Booster Pack
Version 3.4 | By SpeedWorks | View details

UpdraftPlus - Backup/Restore
Version 1.13.5 | By UpdraftPlus.Com, DavidAnderson | View details

VaultPress
Version 1.9.2 | By Automattic | View details

W3 Total Cache
Version 0.9.5.4 | By Frederick Townes | View details

Weather Master
Version 5.0.11 | By TechGasp | View details

Weather Master Addons
Version 5.0.12 | By TechGasp | Visit plugin site

WP Embed Facebook
Version 2.2.0 | By Miguel Sirvent | View details

WP Smush
Version 2.7.4.1 | By WPMU DEV | View details

WP-Optimize
Version 2.1.1 | By David Anderson, Ruhani Rabin, Team Updraft | View details

Yoast SEO
Version 5.2 | By Team Yoast | View details

YouTube Pro
Version 11.8.2 | By EmbedPlus Team | Visit plugin site | Check for updates

Hope this helps.


#4

Ah the joys of WordPress plugins: the more you add, the more problems you’ll get. My guess is that one of those plugins is messing up with AMP specifications. I would suggest to disable them all except the AMP one and validate your pages again. If they pass, add one plugin at the time, check the AMP validator and repeat. My guess is that at one point the validation will fail and you will know which plugin is responsible.

Let us know how that goes!


#5

It looks like the problem plugin was “Speed Booster Pack”, Once I turned that plugin off that cleared all the validation errors.


#6

Woot! Glad you found the solution, thanks for sharing it here.


#7

I reactivated the plugin and went through each option and the one which was causing the problems appears to be “Defer parsing of javascript files”. So, I’ve kept that one off.

We’ll see what Google comes back with after they finish their verification.