Title: error
Last modified: August 31, 2020

---

# error

 *  [Tee](https://wordpress.org/support/users/teenow/)
 * (@teenow)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/error-1407/)
 * I am getting the following errors and I don’t know how to fix them
 * The attribute ‘href’ in tag ‘link rel=stylesheet for fonts’ is set to the invalid
   value wp-includes/css/dist/block-library/style.min.css?ver=5.5′.
    line 37, column
   0
 * The mandatory attribute ‘amp-custom’ is missing in tag ‘style amp-custom’.
    line
   38, column 0
 * The attribute ‘href’ in tag ‘link rel=stylesheet for fonts’ is set to the invalid
   value ‘wp-includes/css/dist/block-library/theme.min.css?ver=5.5’.
    line 41, column
   0
 * The mandatory attribute ‘amp-custom’ is missing in tag ‘style amp-custom’.
    line
   42, column 1
 * The mandatory attribute ‘amp-custom’ is missing in tag ‘style amp-custom’.
    line
   546, column 1
 * The tag ‘img’ may only appear as a descendant of tag ‘noscript’. Did you mean‘
   amp-img’?
    line 578, column 3
 * The tag ‘audio’ may only appear as a descendant of tag ‘noscript’. Did you mean‘
   amp-audio’?
    line 581, column 0
 * The parent tag of tag ‘style amp-custom’ is ‘a’, but it can only be ‘head’.
    
   line 583, column 282
 * The tag ‘amp-analytics’ requires including the ‘amp-analytics’ extension JavaScript.
   
   line 608, column 1
 * The tag ‘amp-analytics extension .json script’ requires including the ‘amp-analytics’
   extension JavaScript.
    line 608, column 57
 * The mandatory tag ‘noscript enclosure for boilerplate’ is missing or incorrect.
   
   line 610, column 7
 * The mandatory tag ‘head > style[amp-boilerplate]’ is missing or incorrect.
    line
   610, column 7
 * The mandatory tag ‘noscript > style[amp-boilerplate]’ is missing or incorrect.
   
   line 610, column 7
 * The mandatory tag ‘amphtml engine v0.js script’ is missing or incorrect.
    line
   610, column 7
    -  This topic was modified 5 years, 9 months ago by [Tee](https://wordpress.org/support/users/teenow/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ferror-1407%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/topic/error-1407/page/2/?output_format=md) [→](https://wordpress.org/support/topic/error-1407/page/2/?output_format=md)

 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/error-1407/#post-13336443)
 * You need to share the URL of the AMP page that has this problem.
 *  Thread Starter [Tee](https://wordpress.org/support/users/teenow/)
 * (@teenow)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/error-1407/#post-13336468)
 * done
    -  This reply was modified 5 years, 9 months ago by [Tee](https://wordpress.org/support/users/teenow/).
    -  This reply was modified 5 years, 9 months ago by [Tee](https://wordpress.org/support/users/teenow/).
 *  [Coop920](https://wordpress.org/support/users/coop920/)
 * (@coop920)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/error-1407/#post-13339152)
 * I’m also getting most of these errors too!
 * Rather than creating another ticket, mine is happening on several pages including
   this one: [https://nutritiouslife.com/recipes/thai-zucchini-noodles-pan-roasted-halibut/amp/](https://nutritiouslife.com/recipes/thai-zucchini-noodles-pan-roasted-halibut/amp/)
 * I’m also getting amp-analytics errors, in which I’m quite sure I have it configured
   correctly.
 *     ```
       {
         "vars": {
           "account": "UA-xxxxxxxx-x"
         },
         "triggers": {
           "trackPageview": {
             "on": "visible",
             "request": "pageview"
           }
         }
       }
       ```
   
 * In which i get errors like:
 * `The tag 'amp-analytics' requires including the 'amp-analytics' extension JavaScript.`
 * Thanks
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/error-1407/#post-13339741)
 * [@coop920](https://wordpress.org/support/users/coop920/) please share your Site
   Health info. You can do so via [this form](https://docs.google.com/forms/d/e/1FAIpQLSfHk32DRaYLgYO3MMg002_wYKqeWJAvHvj-EoSFWOFyDH6ncw/viewform?usp=sf_link).
 *  [Coop920](https://wordpress.org/support/users/coop920/)
 * (@coop920)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/error-1407/#post-13339816)
 * Done. Thank you
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/error-1407/#post-13340119)
 * [@coop920](https://wordpress.org/support/users/coop920/) Thank you. I can see
   2 unique fatal errors in the error log. Do you mind if I post them here?
    -  This reply was modified 5 years, 9 months ago by [Weston Ruter](https://wordpress.org/support/users/westonruter/).
 *  [Coop920](https://wordpress.org/support/users/coop920/)
 * (@coop920)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/error-1407/#post-13340143)
 * That’s fine. If they could be the AMP specific ones, that would be great.
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/error-1407/#post-13340160)
 * There are two errors specifically:
 *     ```
       PHP Fatal error: Uncaught Error: Call to a member function format() on bool in …/wp-content/themes/wordpress-starter-template/functions.php:925
       Stack trace:
       #0 …/wp-includes/class-wp-hook.php(287): nl_amp_set_schema_type(Array, Object(WP_Post))
       #1 …/wp-includes/plugin.php(206): WP_Hook->apply_filters(Array, Array)
       #2 …/wp-content/plugins/amp/includes/amp-helper-functions.php(1794): apply_filters('amp_post_templa...', Array, Object(WP_Post))
       #3 …/wp-content/plugins/amp/src/Transformer/AmpSchemaOrgMetadataConfiguration.php(41): amp_get_schemaorg_metadata()
       #4 …/wp-content/plugins/amp/vendor/ampproject/optimizer/src/Configuration/BaseTransformerConfiguration.php(34): AmpProject\\AmpWP\\Transformer\\AmpSchemaOrgMetadataConfiguration->getAllowedKeys()
       #5 …/wp-content/plugins/amp/vendor/ampproject/optimizer/src/Configuration.php(191): in …/wp-content/themes/wordpress-starter-template/functions.php on line 925
       ```
   
 * And:
 *     ```
       PHP Fatal error: Uncaught Error: Call to undefined function get_rocket_option() in …/wp-content/plugins/wp-rocket/inc/front/process.php:358
       Stack trace:
       #0 [internal function]: do_rocket_callback('###############...', 9)
       #1 …/wp-includes/functions.php(4669): ob_end_flush()
       #2 …/wp-includes/class-wp-hook.php(287): wp_ob_end_flush_all('')
       #3 …/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters('', Array)
       #4 …/wp-includes/plugin.php(478): WP_Hook->do_action(Array)
       #5 …/wp-includes/load.php(1001): do_action('shutdown')
       #6 [internal function]: shutdown_action_hook()
       #7 {main}
        thrown in …/wp-content/plugins/wp-rocket/inc/front/process.php on line 358
       ```
   
 * The second may be caused by the first.
 * There seems to be a bug in the `nl_amp_set_schema_type()` function defined in
   your theme. Since the theme is not publicly available it is difficult for me 
   to determine what the conflict is, however.
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/error-1407/#post-13340174)
 * Your theme is apparently doing something like this:
 * `add_filter( 'amp_post_template_metadata', 'nl_amp_set_schema_type' );`
 * But it apparently has a bug in it. If you could share the source code for the`
   nl_amp_set_schema_type()` function here that would be helpful.
 *  [Coop920](https://wordpress.org/support/users/coop920/)
 * (@coop920)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/error-1407/#post-13340260)
 * [https://gist.github.com/Coop920/b2b06197ab3e4f06d5ee827edfd50516](https://gist.github.com/Coop920/b2b06197ab3e4f06d5ee827edfd50516)
 * It was code that I inherited….so perhaps at this point it is no longer relavant?
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/error-1407/#post-13340289)
 * It appears there is a bug with this line:
 * `$metadata['totalTime'] = $f->diff($e)->format("PT%hH%iM");`
 * The `diff` method is returning `false` apparently, which happens when the difference
   fails to be computed.
 * Try commenting out that line.
 * In any case, we’ll add some better error checking to surface these kinds of errors
   in the next release. It’s difficult to see what’s going wrong at present when
   a fatal error occurs.
 *  Thread Starter [Tee](https://wordpress.org/support/users/teenow/)
 * (@teenow)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/error-1407/#post-13353322)
 * I submitted my site information on the form can you check it please [@westonruter](https://wordpress.org/support/users/westonruter/)
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/error-1407/#post-13353437)
 * [@teenow](https://wordpress.org/support/users/teenow/) You didn’t supply the 
   contents of your PHP error log.
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/error-1407/#post-13353447)
 * Nevertheless, please also try turning off the Endurance Page Cache, if it is 
   enabled. There may be a conflict with that plugin.
 * Otherwise, please try deactivating each plugin one-by-one to identify if something
   else is causing a conflict. If the page validates as AMP when one of those plugins
   is deactivated, then that one plugin is causing the problem. Please share what
   plugin is causing issues.
 *  Thread Starter [Tee](https://wordpress.org/support/users/teenow/)
 * (@teenow)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/error-1407/#post-13353522)
 * the endurance page cache has always been turned off and I deactivated all the
   plugins and still no change. I have completed another form. [@westonruter](https://wordpress.org/support/users/westonruter/)

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/topic/error-1407/page/2/?output_format=md) [→](https://wordpress.org/support/topic/error-1407/page/2/?output_format=md)

The topic ‘error’ is closed to new replies.

 * ![](https://ps.w.org/amp/assets/icon.svg?rev=2527602)
 * [AMP](https://wordpress.org/plugins/amp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/amp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/amp/)
 * [Active Topics](https://wordpress.org/support/plugin/amp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/amp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/amp/reviews/)

 * 16 replies
 * 3 participants
 * Last reply from: [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * Last activity: [5 years, 9 months ago](https://wordpress.org/support/topic/error-1407/page/2/#post-13353628)
 * Status: not resolved