# Critical Error - Not Sure How to Fix

**URL:** <https://community.kinsta.com/t/critical-error-not-sure-how-to-fix/2192>\
**Category:** Community Guides\
**Created:** [March 31, 2023, 8:03am UTC](https://community.kinsta.com/t/critical-error-not-sure-how-to-fix/2192 "2023-03-31T08:03:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![gigi](https://avatars.discourse-cdn.com/v4/letter/g/a587f6/32.png) [@gigi](https://community.kinsta.com/u/gigi)\
**Post date:** [March 31, 2023, 8:03am UTC](https://community.kinsta.com/t/critical-error-not-sure-how-to-fix/2192/1 "2023-03-31T08:03:15Z")

</div>

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

# Time Memory Function Location

1 0.0449 364544 {main}( ) …/index.php\*\*:**0  
2 0.0456 365824 require\_once( '/www/kinsta/public/socius-22/wp-admin/admin.php ) …/index.php **:** 10  
3 0.0456 366640 require\_once( '/www/kinsta/public/socius-22/wp-load.php ) …/admin.php **:** 34  
4 0.0456 367224 require\_once( '/www/kinsta/public/socius-22/wp-config.php ) …/wp-load.php **:** 50  
5 0.0457 376216 require\_once( '/www/kinsta/public/socius-22/wp-settings.php ) …/wp-config.php **:** 105  
6 0.6467 6243904 do\_action( $hook\_name = ‘init’ ) …/wp-settings.php **:** 617  
7 0.6467 6244280 WP\_Hook-\>do\_action( $args = [0 =\> ‘’] ) …/plugin.php **:** 517  
8 0.6467 6244280 WP\_Hook-\>apply\_filters( $value = ‘’, $args = [0 =\> ‘’] ) …/class-wp-hook.php **:** 332  
9 0.6877 7529488 register\_block\_core\_template\_part( ‘’ ) …/class-wp-hook.php **:** 308  
10 0.6877 7529864 build\_template\_part\_block\_variations( ) …/template-part.php **:** 257  
11 0.6877 7531744 build\_template\_part\_block\_instance\_variations( ) …/template-part.php **:** 246  
12 0.6877 7531808 get\_block\_templates( $query = [‘post\_type’ =\> ‘wp\_template\_part’], $template\_type = ‘wp\_template\_part’ ) …/template-part.php **:** 206  
13 0.6877 7531808 apply\_filters( $hook\_name = ‘pre\_get\_block\_templates’, $value = NULL, …$args = _variadic_([‘post\_type’ =\> ‘wp\_template\_part’], ‘wp\_template\_part’) ) …/block-template-utils.php **:** 895  
14 0.6877 7532216 WP\_Hook-\>apply\_filters( $value = NULL, $args = [0 =\> NULL, 1 =\> [‘post\_type’ =\> ‘wp\_template\_part’], 2 =\> ‘wp\_template\_part’] ) …/plugin.php **:** 205  
15 0.6877 7533720 Gutenverse\Theme\_Helper-\>get\_block\_template( $query\_result = NULL, $query = [‘post\_type’ =\> ‘wp\_template\_part’], $template\_type = ‘wp\_template\_part’ ) …/class-wp-hook.php **:** 308  
16 0.7047 7703040 \_build\_block\_template\_result\_from\_post( $post = class WP\_Post { public $ID = 321; public $post\_author = ‘1’; public $post\_date = ‘2023-03-21 03:14:35’; public $post\_date\_gmt = ‘2023-03-21 03:14:35’; public $post\_content = ‘\n**

**\n\n\n\<!-- wp:group {“align”:“full”,“style”:{“spacing”:{“padding”:{“right”:“var:preset spacing 30”,“left”:"var:’…; public $post\_title = ‘Footer (Posts)’; public $post\_excerpt = ‘’; public $post\_status = ‘publish’; public $comment\_status = ‘closed’; public $ping\_status = ‘closed’; public $post\_password = ‘’; public $post\_name = ‘footer-w-posts’; public $to\_ping = ‘’; public $pinged = ‘’; public $post\_modified = ‘2023-03-23 12:17:08’; public $post\_modified\_gmt = ‘2023-03-23 12:17:08’; public $post\_content\_filtered = ‘’; public $post\_parent = 0; public $guid = ‘[http://socius-22.local/?p=321](http://socius-22.local/?p=321)’; public $menu\_order = 0; public $post\_type = ‘wp\_template\_part’; public $post\_mime\_type = ‘’; public $comment\_count = ‘0’; public $filter = ‘raw’ } ) …/class-theme-helper.php**:**219  
17 0.7048 7710352 \_get\_block\_template\_file( $template\_type = ‘wp\_template\_part’, $slug = ‘footer-w-posts’ ) …/block-template-utils.php **:** 712  
18 0.7087 7711296 \_add\_block\_template\_part\_area\_info( $template\_info = [‘slug’ =\> ‘footer-w-posts’, ‘path’ =\> ‘/www/kinsta/public/socius-22/wp-content/themes/wabi/parts/footer-w-posts.html’, ‘theme’ =\> ‘wabi’, ‘type’ =\> ‘wp\_template\_part’] ) …/block-template-utils.php**:\*\*275

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

[Learn more about troubleshooting WordPress.](https://wordpress.org/support/article/faq-troubleshooting/)

---

<div class="post-metadata">

**Author:** ![Alessandro](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/alessandro/32/2310_2.png) [@Alessandro](https://community.kinsta.com/u/Alessandro)\
**Post date:** [March 31, 2023, 12:38pm UTC](https://community.kinsta.com/t/critical-error-not-sure-how-to-fix/2192/2 "2023-03-31T12:38:45Z")

</div>

Hey @gigi,  
Can you please share what OS you use on your computer?

Regards,  
Alessandro

---

<div class="post-metadata">

**Author:** ![ZachE](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/zache/32/1683_2.png) [@ZachE](https://community.kinsta.com/u/ZachE)\
**Post date:** [March 31, 2023, 8:40pm UTC](https://community.kinsta.com/t/critical-error-not-sure-how-to-fix/2192/4 "2023-03-31T20:40:17Z")

</div>

Hi @gigi

It looks like the WordPress 6.2 version update has broken your theme, or your theme doesn’t support the changes required for compatibility:

> <https://github.com/WordPress/WordPress/commit/8ddb28368a296334dbccbca25721aeb30565189a>
>
> Adds \`wp\_theme\_has\_theme\_json()\` for public consumption, to replace the private …internal Core-only \`WP\_Theme\_JSON\_Resolver::theme\_has\_support()\` method. This new global function checks if a theme or its parent has a \`theme.json\` file.
> 
> For performance, results are cached as an integer \`1\` or \`0\` in the \`'theme\_json'\` group with \`'wp\_theme\_has\_theme\_json'\` key. This is a non-persistent cache. Why? To make the derived data from \`theme.json\` is always fresh from the potential modifications done via hooks that can use dynamic data (modify the stylesheet depending on some option, settings depending on user permissions, etc.).
> 
> Also adds a new public function \`wp\_clean\_theme\_json\_cache()\` to clear the cache on \`'switch\_theme'\` and \`start\_previewing\_theme'\`.
> 
> References:
> \* \[https://github.com/WordPress/gutenberg/pull/45168 Gutenberg PR 45168\] Add \`wp\_theme\_has\_theme\_json\` as a public API to know whether a theme has a \`theme.json\`.
> \* \[https://github.com/WordPress/gutenberg/pull/45380 Gutenberg PR 45380\] Deprecate \`WP\_Theme\_JSON\_Resolver:theme\_has\_support()\`.
> \* \[https://github.com/WordPress/gutenberg/pull/46150 Gutenberg PR 46150\] Make \`theme.json\` object caches non-persistent.
> \* \[https://github.com/WordPress/gutenberg/pull/45979 Gutenberg PR 45979\] Don't check if constants set by \`wp\_initial\_constants()\` are defined.
> \* \[https://github.com/WordPress/gutenberg/pull/45950 Gutenberg PR 45950\] Cleaner logic in \`wp\_theme\_has\_theme\_json\`.
> 
> Follow-up to \[54493\], \[53282\], \[52744\], \[52049\], \[50959\].
> 
> Props oandregal, afragen, alexstine, aristath, azaozz, costdev, flixos90, hellofromTonya, mamaduka, mcsf, ocean90, spacedmonkey.
> Fixes #56975.
> Built from https://develop.svn.wordpress.org/trunk@55086
> 
> 
> git-svn-id: http://core.svn.wordpress.org/trunk@54619 1a063a9b-81f0-0310-95a4-ce76da25c4cd

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:

> **[Connect to SSH at Kinsta](https://kinsta.com/docs/connect-to-ssh/)**
>
> SSH access allows you to perform common tasks via the command prompt. Learn how to connect to SSH at Kinsta with Windows, MacOS, or Linux.

> **[WP-CLI v2 - Managing WordPress From the Terminal](https://kinsta.com/blog/wp-cli/#wp-cli-commands)**
>
> WP-CLI v2 is a powerful command line tool for developers to manage WordPress installations. Check out how to install and use WP-CLI commands.

```auto
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](https://kinsta.com/blog/wordpress-automatic-updates/#automatic-updates-plugins)

Let us know if that helps!

---

<div class="post-metadata">

**Author:** ![gigi](https://avatars.discourse-cdn.com/v4/letter/g/a587f6/32.png) [@gigi](https://community.kinsta.com/u/gigi)\
**Post date:** [April 3, 2023, 6:08am UTC](https://community.kinsta.com/t/critical-error-not-sure-how-to-fix/2192/5 "2023-04-03T06:08:23Z")

</div>

Hi @Alessandro and @ZachE thanks for your help!

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()?

---

<div class="post-metadata">

**Author:** ![Agus](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/agus/32/1515_2.png) [@Agus](https://community.kinsta.com/u/Agus)\
**Post date:** [April 3, 2023, 7:36am UTC](https://community.kinsta.com/t/critical-error-not-sure-how-to-fix/2192/6 "2023-04-03T07:36:31Z")

</div>

Hello @gigi 🙂

Thank you for your reply and update.

> 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.

Cheers,  
Agus

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/kinsta/original/2X/8/80f8c4e56fecc02327a0964e6bf63a716483529f.png) [@system](https://community.kinsta.com/u/system)\
**Post date:** [April 2, 2026, 7:37am UTC](https://community.kinsta.com/t/critical-error-not-sure-how-to-fix/2192/7 "2026-04-02T07:37:05Z")

</div>

This topic was automatically closed 1095 days after the last reply. New replies are no longer allowed.
