• Resolved Andrzej Klasén

    (@bibeldans)


    Warning: Attempt to read property “post_type” on null in 

    /wp-content/plugins/all-in-one-seo-pack/app/Common/Standalone/SeoPreview.php on line 93

    Is it some kind of hacking attempt?: ?x=77949453103506 after my URL

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi @bibeldans,

    For the warning message, could you please check in Dashboard > Settings > Reading and tell me what “Your homepage displays” setting is?

    Could you please share where you are seeing the URL displayed as well?

    Thanks!

    Thread Starter Andrzej Klasén

    (@bibeldans)

    1) Your latest posts

    2) https://16.danskyrka.eu/?x=77949453103506 generates Error in Google Chrome:
    Warning: Attempt to read property “post_type” on null in /home/danskyrk/16.danskyrka.eu/wp-content/plugins/all-in-one-seo-pack/app/Common/Standalone/SeoPreview.php on line 93

    Warning
    : Attempt to read property “labels” on null in /home/danskyrk/16.danskyrka.eu/wp-includes/post.php on line 2028

    Fatal error
    : Uncaught Error: Attempt to assign property “labels” on null in /home/danskyrk/16.danskyrka.eu/wp-includes/post.php:2028 Stack trace: #0 /home/danskyrk/16.danskyrka.eu/wp-includes/post.php(1984): _get_custom_object_labels() #1 /home/danskyrk/16.danskyrka.eu/wp-content/plugins/all-in-one-seo-pack/app/Common/Standalone/SeoPreview.php(93): get_post_type_labels() #2 /home/danskyrk/16.danskyrka.eu/wp-content/plugins/all-in-one-seo-pack/app/Common/Standalone/SeoPreview.php(67): AIOSEO\Plugin\Common\Standalone\SeoPreview->getVueData() #3 /home/danskyrk/16.danskyrka.eu/wp-includes/class-wp-hook.php(308): AIOSEO\Plugin\Common\Standalone\SeoPreview->init() #4 /home/danskyrk/16.danskyrka.eu/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() #5 /home/danskyrk/16.danskyrka.eu/wp-includes/plugin.php(565): WP_Hook->do_action() #6 /home/danskyrk/16.danskyrka.eu/wp-includes/class-wp.php(797): do_action_ref_array() #7 /home/danskyrk/16.danskyrka.eu/wp-includes/functions.php(1332): WP->main() #8 /home/danskyrk/16.danskyrka.eu/wp-blog-header.php(16): wp() #9 /home/danskyrk/16.danskyrka.eu/index.php(17): require(‘/home/danskyrk/…’) #10 {main} thrown in /home/danskyrk/16.danskyrka.eu/wp-includes/post.php on line 2028

    There has been a critical error on this website.

    Hi @bibeldans,

    Thank you for the additional information.
    In order to clear the error, please add the following code snippet –

    add_action( 'init', function() {
    	if ( ! function_exists( 'aioseo' ) ) {
    		return;
    	}
    
    	if ( version_compare( '4.3.1', aioseo()->version, '<' ) ) {
    		return;
    	}
    
    	remove_action( 'wp', [ aioseo()->standalone->seoPreview, 'init' ] );
    }, 100);

    Please use the WPCode plugin to easily add the snippet to your website.

    Feel free to reach out if you have any other questions.

    Thanks!

    Thread Starter Andrzej Klasén

    (@bibeldans)

    OK – is it fixed in Version 4.2.9? Works for me now anyway!

    Plugin Support Steve M

    (@wpsmort)

    Hi @bibeldans,

    I wanted to let you know that we released All in One SEO Pro v4.3.1.1 today which fixes this issue.

    Please update to the latest version to get this fix.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘SeoPreview.php’ is closed to new replies.