Support » Plugin: AMP » AMP 0.7 = error 500 ?

  • Resolved BonsPlans

    (@bonsplans)


    Hello,
    I’ve updated the AMP plugin to the 0.7 on my site.
    Right now all the /amp version on my site get error 500.
    I have uninstalled Glue for Yoast SEO & AMP but the problem is same.
    Can you give me the link to download the old version (0.6.2),
    Thank you

    Hervé

Viewing 10 replies - 1 through 10 (of 10 total)
  • Ok i find the 0.6.2 and re-instal ( https://github.com/Automattic/amp-wp/releases)
    so it’s working again.

    Yes, I can confirm the same. And strange enough there is no entry in the apache log. Thanks for the link.

    • This reply was modified 1 year, 5 months ago by  blablabla.

    Yup 500 server error – WordPress 4.9.5 + latest Yoast + Latest Glue. Needs a quick fix. Downgrading immediately.

    Config debug shows a bit of a mess

    Fatal error: Uncaught Error: Call to a member function canonical() on null in /home/mine/public_html/mydomain.com/wp-content/plugins/glue-for-yoast-seo-amp/classes/class-frontend.php:162 Stack trace: #0 /home/mine/public_html/mydomain.com/wp-includes/class-wp-hook.php(288): YoastSEO_AMP_Frontend->fix_amp_post_data(Array) #1 /home/mine/public_html/mydomain.com/wp-includes/plugin.php(203): WP_Hook->apply_filters(Array, Array) #2 /home/mine/public_html/mydomain.com/wp-content/plugins/amp/includes/templates/class-amp-post-template.php(156): apply_filters(‘amp_post_templa…’, Array, Object(WP_Post)) #3 /home/mine/public_html/mydomain.com/wp-content/plugins/amp/amp.php(328): AMP_Post_Template->__construct(Object(WP_Post)) #4 /home/mine/public_html/mydomain.com/wp-content/plugins/amp/amp.php(280): amp_render_post(Object(WP_Post)) #5 /home/mine/public_html/mydomain.com/wp-includes/class-wp-hook.php(286): amp_render(”) #6 /home/mine/public_html/mydomain.com/wp-includes/class-wp-hook.php(31 in /home/mine/public_html/mydomain.com/wp-content/plugins/glue-for-yoast-seo-amp/classes/class-frontend.php on line 162

    • This reply was modified 1 year, 5 months ago by  frenchomatic.

    hello
    same bug for me after update to 7.0
    it’s now working with downgrade to 0.6.2

    waiting for the fix to update

    tanks

    Please see answers on this issue https://wordpress.org/support/topic/the-latest-amp-plugin-cause-500-error/

    It’s likely to be caused by the https://wordpress.org/plugins/glue-for-yoast-seo-amp/ plugin.

    We have submitted a Pull Request ( a fix ) to their plugin that should solve this.

    Okay, thank you David,
    I’ll wait for a fix.
    But it isn’t clear for me I’ve uninstalled the plugin Glue for Yoast SEO & AMP and even after uninstalled-installed AMP for WordPress (+empty the cache) the problem isn’t solved ?

    Plugin Author Weston Ruter

    (@westonruter)

    @bonsplans With 0.7 active and the Yoast Glue plugin deactivated, when you see a white screen it would be helpful to share the error log. If you don’t have access to the log, you should be able to get errors displayed by adding define( 'WP_DEBUG', true ); to your wp-config.php. Thanks for helping identify the error.

    Plugin Author Weston Ruter

    (@westonruter)

    For the problem with the Yoast Glue plugin, here is a temporary workaround you can add to your custom theme or custom plugin to fix the fatal error: https://github.com/Yoast/yoastseo-amp/pull/89#issuecomment-386676100

    Thanks Weston that fixed it for me.

    Here is a code snippets JSON if anyone wants it.

    {"generator":"Code Snippets v2.10.1.1","date_created":"2018-05-04 19:46","snippets":[{"name":"Fix AMP 500 Error","desc":"Workaround to ensure that YoastSEO_AMP_Frontend::$front is defined prior to YoastSEO_AMP_Frontend::fix_amp_post_metadata() running.\r\n\r\nhttps:\/\/github.com\/Yoast\/yoastseo-amp\/pull\/89\r\nhttps:\/\/wordpress.org\/support\/topic\/%F0%9F%91%89-read-before-submitting-a-support-topic\/\r\nhttps:\/\/wordpress.org\/support\/topic\/amp-0-7-error-500\/\r\n","scope":"global","code":"\/**\r\n * Workaround to ensure that YoastSEO_AMP_Frontend::$front is defined prior to YoastSEO_AMP_Frontend::fix_amp_post_metadata() running.\r\n *\r\n * @link https:\/\/github.com\/Yoast\/yoastseo-amp\/pull\/89\r\n * @see YoastSEO_AMP_Frontend::fix_amp_post_data\r\n * @see YoastSEO_AMP_Frontend::fix_amp_post_metadata()\r\n * @param array $data Pass-through data.\r\n * @return array Data.\r\n *\/\r\nfunction amp_wp_yoast_glue_temp_workaround( $data ) {\r\n\tamp_get_schemaorg_metadata();\r\n\treturn $data;\r\n}\r\nadd_filter( 'amp_post_template_data', 'amp_wp_yoast_glue_temp_workaround', 9 ); \/\/ Before 10."}]}

    • This reply was modified 1 year, 5 months ago by  wormeyman.

    Thank you @westonruter !
    I fix the error with the custom plugin

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘AMP 0.7 = error 500 ?’ is closed to new replies.