1

No idea how this happened. Site was working, installed a plugin last night and uninstalled it.

Admin panel works fine. Whenever I try to edit a page or post, WP throws this error on the live site. I checked from another machine I haven't touched ;) and same error occurs, eliminating the possibility that a Windows 10 MAMP or hosts file configuration could be interfering with php.

The site is running 5.5.3 and php 7.4.1.

The full error:

Fatal error: Uncaught Error: 
Call to undefined function _wp_array_get() in /usr/www/users/rhistory/ridgefieldhistoricalsociety.org/main/wp-content/plugins/gutenberg/lib/class-wp-theme-json.php:517 
Stack trace: 
#0 /usr/www/users/rhistory/ridgefieldhistoricalsociety.org/main/wp-content/plugins/gutenberg/lib/class-wp-theme-json.php(342): WP_Theme_JSON::get_blocks_metadata() 
#1 /usr/www/users/rhistory/ridgefieldhistoricalsociety.org/main/wp-content/plugins/gutenberg/lib/class-wp-theme-json-resolver.php(422): WP_Theme_JSON->__construct() 
#2 /usr/www/users/rhistory/ridgefieldhistoricalsociety.org/main/wp-content/plugins/gutenberg/lib/global-styles.php(206): WP_Theme_JSON_Resolver::get_merged_data(Array, 'theme') 
#3 /usr/www/users/rhistory/ridgefieldhistoricalsociety.org/main/wp-includes/class-wp-hook.php(289): gutenberg_experimental_global_styles_settings(Array) 
#4 /usr/www/users/rhistory/ridgefieldhistoricalsociety.org/main/wp-includes/plugin.php(206): WP_Hook->apply_filters(Array, Array) 
#5 /usr/www/users/rhistory/ridgefieldh in /usr/www/users/rhistory/ridgefieldhistoricalsociety.org/main/wp-content/plugins/gutenberg/lib/class-wp-theme-json.php on line 517

Not sure why the last line's php url is cut off -- any ideas from someone who's been through this before? Total newbie with WP PHP errors and I have to get this site back up by noon _/\_


UPDATE: The problem is resolved by deactivating Gutenberg, which had auto-updated since my last edit on the site.

Gutenberg plugin is mentioned in both the fatal error and stack trace #3, hints at the source of the error.

6
  • _wp_array_get should be defined in wp-includes/functions.php. Can you check that file looks OK, and / or try replacing it with a fresh copy from a 5.5.3 download? – Rup Mar 24 at 14:22
  • 1
    Oh, except it's new in 5.6.0. I'd guess your version of the Gutenberg plugin needs 5.6+. Try deactivating it or upgrade WordPress. – Rup Mar 24 at 14:24
  • Great thinking - in fact Gutenberg was updated the day after I last edited the site. And I have auto updates enabled. Will check that out and get back to you. (I had to roll back to 5.5.3 because upgrading to 5.7 broke the site a few months ago, so fingers crossed...) – Rickmakeitquick Mar 24 at 14:28
  • 1
    Deactivating Gutenberg fixed it. Thank you @Rup!! – Rickmakeitquick Mar 24 at 14:47
  • 1
    Unless you’re beta testing new Gutenberg features, you don’t need that plugin installed. – Jacob Peattie Mar 24 at 15:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.