• Resolved clayteller

    (@clayteller)


    Hello, I’ve used the plugin for years, and it’s great. Wondering if you can take a look at the following error that seems to be related to the plugin and decipher what may be going on?

    Some of the pages on our site were erroring out and it seems to be related to this error. I disabled the User Switching plugin and that seems to fix the error. Any thoughts on what could be going on here? Please let me know if I can provide any more info. Thanks for your help and a great plugin!

    PHP Fatal error: Uncaught TypeError: Argument 1 passed to user_switching::switch_to_url() must be an instance of WP_User, instance of stdClass given, called in /nas/content/live/eremedia/wp-content/plugins/user-switching/user-switching.php on line 486 and defined in /nas/content/live/eremedia/wp-content/plugins/user-switching/user-switching.php:696\nStack trace:\n#0 /nas/content/live/eremedia/wp-content/plugins/user-switching/user-switching.php(486): user_switching::switch_to_url(Object(stdClass))\n#1 [internal function]: user_switching->action_admin_bar_menu(Object(WP_Admin_Bar))\n#2 /nas/content/live/eremedia/wp-includes/class-wp-hook.php(286): call_user_func_array(Array, Array)\n#3 /nas/content/live/eremedia/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)\n#4 /nas/content/live/eremedia/wp-includes/plugin.php(531): WP_Hook->do_action(Array)\n#5 /nas/content/live/eremedia/wp-includes/admin-bar.php(86): do_action_ref_array('admin_bar_menu', Array)\n#6 [internal function]: wp_admin_bar_render('')\n#7 /nas/conten in /nas/content/live/eremedia/wp-content/plugins/user-switching/user-switching.php on line 696

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author John Blackbourn

    (@johnbillion)

    WordPress Core Developer

    Thanks for the report. This looks like it’s related to the admin toolbar menu item that User Switching shows when viewing author archives.

    Does this only happen on author archives? Or does it also happen on other pages?

    Thread Starter clayteller

    (@clayteller)

    Hey John, thanks for the quick reply. Yes, that’s right, seems to only happen on author archives.

    Thread Starter clayteller

    (@clayteller)

    Hmm, this may be clashing with another plugin we use call Coauthors Plus. Does that seem possible based on what you see in that error message?

    Plugin Author John Blackbourn

    (@johnbillion)

    WordPress Core Developer

    Yes that does sound like the sort of plugin that could cause a problem. I’ll see if I can find some time to take a look.

    Thread Starter clayteller

    (@clayteller)

    Thanks, John.

    ptravassos

    (@ptravassos)

    Same problem here. Only at author archive page.

    Plugin Author John Blackbourn

    (@johnbillion)

    WordPress Core Developer

    Fixed in 1.5.1.

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

The topic ‘PHP Fatal error’ is closed to new replies.