Support » Plugin: User Switching » Backend broken for “administrator” only – Blank screen / Error 500

  • Resolved Stefanowitz

    (@stefanowitz)


    The “User Switching” plugin and the “Admin Bar User Switching” plugin were working just fine for several days.

    Today I tried to switch to another user using the “Switch To” dropdown in admin bar. I opened the dropdown, entered a user name, triggered the search but for some reason the dropdown didnt respond anymore, it hung up. I then reloaded the page and from then on I got only a blank screen (error 500) in /wp-admin/. I tried to log in again, even with other admin users – it didnt help. All pages in /wp-admin/ result in blank screen / error 500. Fun fact: users with other roles than “Administrator” (like “Editor”) can login without problem.

    I spent quite some time debugging and found the following to be true:

    – the problem affects ALL users with capability “administrator”
    – the problem exists in all browsers and all devices
    – changing “Secret Keys” in wp-config didnt help
    – WP_DBUG true doesnt help, no warning or error message is output
    – users with other capabilitties (e.g. “editor”) can login to backend
    – disabling the plugins by renaming the “user-switching” and “admin-bar-user-switching” folders via FTP didnt help
    – when I change db value “wp_capabilities” via phpMyAdmin to something other then “administrator” (like “editor”) I immediatly CAN login again, but – as I am no Admin – I cant access anything helpful to debugging. As soon as I change it back to “a:1:{s:13:”administrator”;b:1;}” I get blank screen again

    ANY help would be highly appreciated as I am currently de facto logged out from backend as Admin.

    Thanks!!
    Stefanowitz

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

    (@johnbillion)

    WordPress Core Developer

    So sorry to hear this.

    The User Switching plugin doesn’t make any changes to user accounts or roles, and the only write operations it performs are to the cookies sent to your browser.

    That said, here are a few things you can try:

    What does the value of the wp_user_roles option look like? Is the “Administrator” role still present?

    Can you check your PHP error log to see what error is triggering the 500?

    I would try deactivating other plugins on your site to see if you can identify the problem. If you can’t access the Plugins screen then you can rename their directories in the wp-content/plugins directory to deactivate them. I’d also recommend using WP-CLI for this task if your hosting supports it.

    Beyond that, there is a chance that there is some malicious code on your site that has removed the Administrator role or broken something else, so I would look into services or tools provided by Wordfence or Sucuri to scan your site.

    If you don’t get anywhere, I’d try posting in the main wordpress.org support forums.

    Hope you get it sorted
    John

Viewing 1 replies (of 1 total)
  • The topic ‘Backend broken for “administrator” only – Blank screen / Error 500’ is closed to new replies.