• Resolved whytester

    (@whytester)


    Hi

    One of our sites has what appears to be a conflict between YOAST seo plugin and the event manager plugin.

    The conflict is only affecting admins atleast, so regular users aren’t affected.

    Just in case it is helpful, the site page affected is here – https://www.plexal.com/event/members-night-2/

    The full error –

    “Fatal error: Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Type error: Argument 1 passed to WPSEO_Admin_Bar_Menu::get_post_score() must be an instance of WP_Post, instance of stdClass given, called in plugins/wordpress-seo/inc/class-wpseo-admin-bar-menu.php on line 144 in plugins/wordpress-seo/inc/class-wpseo-admin-bar-menu.php:482 Stack trace: #0 plugins/wordpress-seo/inc/class-wpseo-admin-bar-menu.php(144): WPSEO_Admin_Bar_Menu->get_post_score(Object(stdClass)) #1 plugins/wordpress-seo/inc/class-wpseo-admin-bar-menu.php(60): WPSEO_Admin_Bar_Menu->add_root_menu(Object(WP_Admin_Bar)) #2 wp-includes/class-wp-hook.php(286): WPSEO_Admin_Bar_Menu->add_menu(Object(WP_Admin_Bar)) #3 / in plugins/wordpress-seo/inc/class-wpseo-admin-bar-menu.php on line 482”

    We are using YOAST SEO v8.0
    The events calendar 4.6.21
    Wordpress 4.9.8

    Obviously disabling either plugin isn’t an option.

    Have tried removing the events submenu from the WP admin bar using the following code – define(‘TRIBE_DISABLE_TOOLBAR_ITEMS’, true); – but this didn;t stop the fatal error occurring

    Any assistance on this is appreciated.

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @whytester,

    I have no affiliation with Yoast and I don’t know what your issue is but we had the same issue on an old site of ours. The problem for that site was we were doing a custom DB query and then looping through the results and passing each post to setup_postdata(). I believe this was setting a standard PHP object as the global $post object. That’s bad.

    If you’re sure it’s an issue with the events, you should probably contact The Events Calendar folks. This isn’t an issue with Yoast per se.

    (However, Yoast is checking if $post is an object and should probably also check if it’s an object of the class WP_Post if it’s going to pass it to a function requiring a WP_Post object.)

    Cheers,
    Kevin.

    Hey there @whytester!

    Thanks for reaching out.

    I’ll do some digging and see if I can determine why this is happening. I’ll update when I have some info!

    Take care,
    Ed ✌️

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

The topic ‘WPSEO admin bar fatal error’ is closed to new replies.