• Resolved michikoh

    (@michikoh)


    I was working on the Local backend of WordPress(https://localhost:8888/portfolio/). I used my own theme originally and switched to one of the twenty-twenty themes. It was fine but when I checked the local WordPress backend again after my computer went into sleep mode and came back, the backend of WordPress got 2 Fatal errors below and I cannot see any backend of WordPress other than those 2 error messages. Could you please help me how to fix it and/ or change the theme to my theme?

    Message 1
    Fatal error: Uncaught Error: Call to undefined function fwd_register_custom_post_types() in /Applications/MAMP/htdocs/portfolio/wp-content/themes/michiko-portfolio/inc/cpt-taxonomy.php:56 Stack trace: #0 /Applications/MAMP/htdocs/portfolio/wp-includes/class-wp-hook.php(309): portfolio_rewrite_flush(‘Twenty Twenty-O…’) #1 /Applications/MAMP/htdocs/portfolio/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array) #2 /Applications/MAMP/htdocs/portfolio/wp-includes/plugin.php(476): WP_Hook->do_action(Array) #3 /Applications/MAMP/htdocs/portfolio/wp-includes/theme.php(3377): do_action(‘after_switch_th…’, ‘Twenty Twenty-O…’, Object(WP_Theme)) #4 /Applications/MAMP/htdocs/portfolio/wp-includes/class-wp-hook.php(307): check_theme_switched(”) #5 /Applications/MAMP/htdocs/portfolio/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array) #6 /Applications/MAMP/htdocs/portfolio/wp-includes/plugin.php(476): WP_Hook->do_action(Array) #7 /Applications/MAMP/htdocs/portfolio/wp-settings.php(598): do_action(‘init’) #8 /Applications/MAMP/htdocs/portfolio/wp-config.php(96): require_once(‘/Applications/M…’) #9 /Applications/MAMP/htdocs/portfolio/wp-load.php(50): require_once(‘/Applications/M…’) #10 /Applications/MAMP/htdocs/portfolio/wp-blog-header.php(13): require_once(‘/Applications/M…’) #11 /Applications/MAMP/htdocs/portfolio/index.php(17): require(‘/Applications/M…’) #12 {main} thrown in /Applications/MAMP/htdocs/portfolio/wp-content/themes/michiko-portfolio/inc/cpt-taxonomy.php on line 56
    There has been a critical error on this website.`

    Message 2
    Fatal error: Uncaught Error: Object of class WP_Error could not be converted to string in /Applications/MAMP/htdocs/portfolio/wp-content/plugins/sg-security/templates/error.php:111 Stack trace: #0 /Applications/MAMP/htdocs/portfolio/wp-content/plugins/sg-security/core/Helper/Helper.php(111): include() #1 /Applications/MAMP/htdocs/portfolio/wp-includes/functions.php(3713): SG_Security\Helper\Helper->custom_wp_die_callback(Object(WP_Error), ”, Array) #2 /Applications/MAMP/htdocs/portfolio/wp-includes/class-wp-fatal-error-handler.php(234): wp_die(Object(WP_Error), ”, Array) #3 /Applications/MAMP/htdocs/portfolio/wp-includes/class-wp-fatal-error-handler.php(153): WP_Fatal_Error_Handler->display_default_error_template(Array, Object(WP_Error)) #4 /Applications/MAMP/htdocs/portfolio/wp-includes/class-wp-fatal-error-handler.php(57): WP_Fatal_Error_Handler->display_error_template(Array, Object(WP_Error)) #5 [internal function]: WP_Fatal_Error_Handler->handle() #6 {main} thrown in /Applications/MAMP/htdocs/portfolio/wp-content/plugins/sg-security/templates/error.php on line 111`

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    Rename your theme’s folder (/michiko-portfolio/). When WP can no longer find the current theme where it’s expected to be, it’ll switch to one of the default twenty* themes.

    For good measure, also deactivate the security plugin by renaming its folder (/sg-security/) as well. Or deactivate all themes by renaming the /plugins/ folder. Once you regain error free admin access, you can restore the proper folder names and reactivate plugins. You do need to correct the error in your theme before attempting to activate it.

    I know you said you had switched to a twenty* theme, so yours shouldn’t be active, but you wouldn’t get that error if it were inactive. Somehow WP thinks it’s still active. Either the activation was never completely registered, or it was somehow forgotten when asleep.

    Thread Starter michikoh

    (@michikoh)

    Hello bcworkz,

    Thank you very much for your reply.

    I renamed my theme and refreshed the WordPress backend. It said michiko-portfolio is not detected, so I changed it to the original name michiko-portfolio, and it worked! Everything is back to normal!

    Thank you so much ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Local: Fatal Error after switching Theme’ is closed to new replies.