I’m suddenly encountering a critical error and I’m not sure what broke the site. I’m not a coder, so I’ve been installing various plugins to do a wordpress block theme on gutenberg. The last time I opened the site on Wednesday, everything was working fine but it suddenly hit a critical error when I tried to open the site today and I’m not sure how I can fix it.
I’ve tried disabling the plugins by going into the wp-content folder and changing the name and changing it back but it doesn’t change the critical error.
Any help would be appreciated!
The error is
( ! ) Fatal error: Uncaught Error: Call to undefined function wp_theme_has_theme_json() in /www/kinsta/public/socius-22/wp-includes/block-template-utils.php on line 373
( ! ) Error: Call to undefined function wp_theme_has_theme_json() in /www/kinsta/public/socius-22/wp-includes/block-template-utils.php on line 373
Call Stack
It looks like the WordPress 6.2 version update has broken your theme, or your theme doesn’t support the changes required for compatibility:
So, this would not be a DevKinsta issue unfortunately. As an immediate solution to the problem so you can get it back online, you could roll back the WordPress version with WP-CLI over SSH:
cd ~/public
wp core download --version=6.1 --locale=en_US --force --skip-themes
Then, either use wp-config.php or a plugin to enforce disabling automatic / core updates, since DevKinsta can only push/pull to staging - A Deep Dive Into WordPress Automatic Updates
I’m on a Mac OS Monterey 12.2.1, MacBook Pro 14 inch M1.
I managed to get it into recovery mode by changing the theme name in the DevKinsta folder containing my site and then also disabling all the plugins.
I will try to enforce disabling automatic updates, but in order for this critical error to not repeat, should I follow the github link in order to include wp_theme_has_theme_json()?
but in order for this critical error to not repeat, should I follow the github link in order to include wp_theme_has_theme_json()?
We can’t really tell or guarantee if that would help (for the critical error to not repeat) and it’s out of our support scope - as it’s not DevKinsta issue at all but WordPress’s theme code/compatibility with WordPress core version 6.2.
It’s better to reach out to your web developers/programmers to help you out with it, or best please ask the theme ( wabi ) support team if possible and see if they have newest theme version which might be compatible with WordPress 6.2 version.