Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter emilialaunchit

    (@emilialaunchit)

    Continued troubleshooting and found code from the prior developer, that didn’t update with the theme’s plugin updates and we discovered the flaw, and were able to fix it. Thank you. Resolved 🙂

    Thread Starter emilialaunchit

    (@emilialaunchit)

    Hi John, thanks for getting back to me. I’ve obtained the PHP error log and found this repeated fatal error (site root shortened below):

    PHP Fatal error: Uncaught TypeError:
    user_switching::switch_back_url(): Argument #1 ($user)
    must be of type WP_User, bool given,
    called in wp-content/cache/acorn/framework/views/4518aee64706605bad1ad9628b5f89c369cef95f.php
    on line 29 and defined in
    wp-content/plugins/user-switching/user-switching.php:1029

    The stack trace shows user_switching::switch_back_url(false) and identifies this theme template:

    wp-content/themes/inagrafton/resources/views/sections/header-sms.blade.php

    This happens when I click “Switch To” from the Users screen. We recently migrated the site to WP Engine, and we don’t have access to the original theme developers.

    Does this indicate that the theme’s custom switch-back link needs a check for a valid user before calling switch_back_url()? Any guidance on the correct implementation would be appreciated. Thank you!

    Thread Starter emilialaunchit

    (@emilialaunchit)

    hi! The error produces a critical error on the website and the user can’t move forward. Does the link allow you to view it?

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