WordPress.org

Forums

WordPress SEO by Yoast
PHP Fatal Error with wpseo_use_page_analysis set to false for posts (6 posts)

  1. Scott Kingsley Clark
    Member
    Posted 2 years ago #

    WordPress version: 3.4.2
    WordPress SEO version: 1.2.8.6

    I did this: Went to edit a post with a focus keyword

    I expected the plugin to do this: Load the post and SEO meta box

    Instead it did this: Fatal php error that Yoast_TextStatistics didn't exist at line 1055 in admin/class-metabox.php, this is because we disabled page analysis with the filter: "wpseo_use_page_analysis"

    The fix for this is to carry over the filter check for the tab output and the tab link within an if conditional like other areas that check for the filter:

    if ( apply_filters( 'wpseo_use_page_analysis', true ) === true )

    http://wordpress.org/extend/plugins/wordpress-seo/

  2. Scott Kingsley Clark
    Member
    Posted 2 years ago #

    Happening when saving now.

    in admin/class-metabox.php around line 728 of the save_postdata method, there should be an wpseo_use_page_analysis filter check before running calculate_results method.

  3. Bill Erickson
    Member
    Posted 2 years ago #

    I'm also getting this error on a lot of client sites.

  4. ramseyp
    Member
    Posted 2 years ago #

    I'm seeing this on a site today. WordPress 3.5.1, Yoast SEO 1.3.4.4, freshly reinstalled via FTP. Is there any fix or workaround?

    I'm seeing it only on the static page designated as the homepage. I thought it was related to my hiding the content editor, but on another page without the content editor, the SEO box loads just fine.

  5. Scott Kingsley Clark
    Member
    Posted 2 years ago #

  6. alexis.nomine
    Member
    Posted 2 years ago #

    Thanks Scott for your fix. I was getting this error when saving on v1.4.7 and now it's gone :)
    Here it is for those who want a quick solution:
    Edit /wordpress-seo/admin/class-metabox.php, line 1058 add:

    elseif ( apply_filters( 'wpseo_use_page_analysis', true ) !== true ) {
     $result = new WP_Error( 'page-analysis-disabled', sprintf( __( 'Page Analysis has been disabled.', 'wordpress-seo' ), $post->post_type ) );
     return $result;
    }

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WordPress SEO by Yoast
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic