Support » Plugin: Yoast SEO » accelerated mobile pages (AMP) plugin problem with yoast new version

Viewing 5 replies - 1 through 5 (of 5 total)
  • The new AMP update conflicts with Yoast AMP Glue if that’s what you mean where all your AMP pages show a 505 error.

    If this is your issue, here is the workout around that you need to put in either your theme functions.php or create a custom plugin. I just added this to functions.php and everything worked perfectly again.

    I originally thought I needed to add a closing bracket onto the workaround (as sometimes they are forgotten), but this workaround works as is. If you add a closing bracket, it will bring your site down.

    ++++++++ /**
    * Workaround to ensure that YoastSEO_AMP_Frontend::$front is defined prior to YoastSEO_AMP_Frontend::fix_amp_post_metadata() running.
    *
    * @link https://github.com/Yoast/yoastseo-amp/pull/89
    * @see YoastSEO_AMP_Frontend::fix_amp_post_data
    * @see YoastSEO_AMP_Frontend::fix_amp_post_metadata()
    * @param array $data Pass-through data.
    * @return array Data.
    */
    function amp_wp_yoast_glue_temp_workaround( $data ) {
    amp_get_schemaorg_metadata();
    return $data;
    }
    add_filter( ‘amp_post_template_data’, ‘amp_wp_yoast_glue_temp_workaround’, 9 );
    // Before 10.
    +++++++

    Yoast just did an update to their Glue plugin which takes care of the AMP 505 error problem.

    Plugin Support devnihil

    (@devnihil)

    @mehdiahmadi Can you please try updating the Glue for Yoast SEO & AMP plugin to the newest version and checking whether this resolves your issue?

    If you continue to experience any errors in relation to the Glue for Yoast SEO & AMP plugin we would recommend creating an issue here: https://wordpress.org/support/plugin/glue-for-yoast-seo-amp

    The Glue update gets AMP working find again, but don’t forget to take out the override functions.php code if you added that before the Yoast Glue update.

    Plugin Support Michael Tina

    (@mikes41720)

    @mehdiahmadi Can you confirm if the issue resolves if you update to the latest version of Glue for Yoast SEO & AMP?

    If you continue to experience any errors in relation to the Glue for Yoast SEO & AMP plugin we would recommend creating an issue here: https://wordpress.org/support/plugin/glue-for-yoast-seo-amp

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘accelerated mobile pages (AMP) plugin problem with yoast new version’ is closed to new replies.