• I updated WordPress to version 6.4.1 and installed a new theme. Unfortunately, it has broken WP and comes up with the following below error message.
    Im running the site locally using localwp, which also has been updated to the latest version as well.


    Can anyone help how to fix this?


    Fatal error: Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, function “save_heystudio_news_fields” not found or invalid function name in /Users/user/Local Sites/asamone/app/public/wp-includes/class-wp-hook.php:324 Stack trace: #0 /Users/user/Local Sites/asamone/app/public/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #1 /Users/user/Local Sites/asamone/app/public/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #2 /Users/user/Local Sites/asamone/app/public/wp-admin/admin.php(175): do_action(‘admin_init’) #3 /Users/user/Local Sites/asamone/app/public/wp-admin/index.php(10): require_once(‘/Users/user/Loc…’) #4 {main} thrown in /Users/user/Local Sites/asamone/app/public/wp-includes/class-wp-hook.php on line 324

    There has been a critical error on this website. Please check your site admin email inbox for instructions.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi there!

    A quick fix to prevent the fatal error is going to wp-content/themes/heystudio/custom-fields.php and comment line 390, which is the root cause.

    The code responsible of crashing the site is:

    add_action('admin_init', 'save_heystudio_news_fields');

    It seems that the function save_heystudio_news_fields is not defined in any part of the theme code.

    I’ve also seen some warnings when activating the theme, so it may need some more tweaks.
    The best option is still to contact the theme provider (the site where you downloaded it) and let them know that the theme is crashing the site in WP 6.4!

    Hope it helps!

    • This reply was modified 1 year, 4 months ago by Carlos Bravo.

    Hi @asamshah,

    Please try the following steps:

    1. Make sure the installed theme is compatible with WordPress version 6.4.1. You can also contact the theme developer or check their documentation for any updates.
    2. Deactivate the new theme by renaming its folder in the “wp-content/themes” directory in these steps:
      – Using localwp or via FTP, access your WordPress installation
      – Navigate to the “wp-content/themes” directory
      – Rename the folder of the newly installed theme. This will deactivate the theme and allow you to access your website.
      Just remember to always back up your website before making any changes.
    3. If you have a backup of your website before the update, restore it to get back to the previous working state.
    4. You can also check error logs in your localwp environment for more details.

    After all, the best thing to do here is to contact the theme support team and let them about the issue.

    Moderator t-p

    (@t-p)

    What theme are you using?

    Theme acquired from?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Installing new theme breaks WordPress’ is closed to new replies.