• I can no longer access my WP Dashboard unless I deactivate Genesis Blocks. When I try to login I get this error message.
    “There has been a critical error on this website. Please check your site admin email inbox for instructions.”

    When I run the WP recovery I get this message.

    Version 1.5.1 | By StudioPress | View details
    
    This plugin failed to load properly and is paused during recovery mode.
    
    An error of type E_ERROR was caused in line 212 of the file /nas/content/live/msprings/wp-content/plugins/genesis-blocks/lib/Settings/AdminPage.php. Error message: Uncaught TypeError: Genesis\Blocks\Settings\AdminPage::add_body_class(): Return value must be of type string, null returned in /nas/content/live/msprings/wp-content/plugins/genesis-blocks/lib/Settings/AdminPage.php:212 Stack trace: #0 /nas/content/live/msprings/wp-includes/class-wp-hook.php(307): Genesis\Blocks\Settings\AdminPage->add_body_class(NULL) #1 /nas/content/live/msprings/wp-includes/plugin.php(191): WP_Hook->apply_filters(NULL, Array) #2 /nas/content/live/msprings/wp-admin/admin-header.php(242): apply_filters('admin_body_clas...', '') #3 /nas/content/live/msprings/wp-admin/index.php(137): require_once('/nas/content/li...') #4 {main} thrown

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Ryan Kienstra

    (@ryankienstra)

    Hi @erwordpresser,
    Sorry, that must be frustrating to not be able to get in your dashboard unless you deactivate Genesis Blocks.

    It’s going to be hard to find this, but is there another plugin you might have activated or updated recently that might be causing this?

    That error might be expected.

    The error comes from line 212, and it looks like Genesis Blocks isn’t changing the value of the body class, it’s simply returning it:

    
    return $classes;
    

    …but there’s an error because the expected return type is string:

    
    public function add_body_class( $classes ): string {
    

    And that return type of string looks correct, as Core shows the expected type is a string.

    So it might be that a theme or plugin is incorrectly filtering 'add_body_class' and returning null.

    Though some might say we shouldn’t have a strict return type that can cause that kind of error.

    Thanks for your patience.

    Thread Starter ERWordpresser

    (@erwordpresser)

    Thanks for your response @ryankienstra but this doesn’t help solve my problem. I posted the error message over on WP Subscribe Pro support and they pointed me back to the Genesis group. My website is hosted on WP Engine so I may need to go directly to the team there. Right now I have WP Subscribe Pro deactivated but I need it working.

    Thanks again.

    Plugin Contributor Ryan Kienstra

    (@ryankienstra)

    @erwordpresser,
    Thanks for letting me know.

    I deleted that type check in Genesis Blocks so you won’t see that error.

    Though it probably won’t be released for several weeks.

    Thread Starter ERWordpresser

    (@erwordpresser)

    Thanks for the fix @ryankienstra I will leave WP Subscribe Pro deactivated until the latest update I guess. Don’t know any other way to keep things working.

    Plugin Contributor Ryan Kienstra

    (@ryankienstra)

    @erwordpresser,
    You can reactivate WP Subscribe Pro now if you update to the latest version of Genesis Blocks.

    Version 1.5.2 should fix this bug.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Genesis Blocks plugin failed to load properly’ is closed to new replies.