Fatal Error 'Uncaught TypeError' emanating from /mu-plugins/wpengine-common

Bug Summary

Summarize the issue in one to two sentences.
Two related issues: from 1 to multiple duplicate warnings at the top of every page:

Warning : Trying to access array offset on value of type null in /Volumes/G-DRIVE/LocalSites/kornfeld2/app/public/wp-content/mu-plugins/wpengine-common/plugin.php on line 768

When trying to save Avada Layout or trying to view settings within BBPress Style Pack plugin, get same error:

Fatal error : Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /Volumes/G-DRIVE/LocalSites/kornfeld2/app/public/wp-content/mu-plugins/wpengine-common/plugin.php:1348 Stack trace: #0 /Volumes/G-DRIVE/LocalSites/kornfeld2/app/public/wp-content/mu-plugins/wpengine-common/plugin.php(1638): WpeCommon::is_object_cache_enabled() #1 /Volumes/G-DRIVE/LocalSites/kornfeld2/app/public/wp-content/themes/Avada/includes/lib/inc/class-fusion-cache.php(192): WpeCommon::purge_memcached() #2 /Volumes/G-DRIVE/LocalSites/kornfeld2/app/public/wp-content/themes/Avada/includes/lib/inc/class-fusion-cache.php(159): Fusion_Cache->clear_third_party_caches() #3 /Volumes/G-DRIVE/LocalSites/kornfeld2/app/public/wp-content/themes/Avada/includes/lib/inc/functions.php(1269): Fusion_Cache->reset_all_caches(Array) #4 /Volumes/G-DRIVE/LocalSites/kornfeld2/app/public/wp-content/plugins/fusion-builder/inc/class-fusion-template-builder.php(3090): fusion_reset_all_caches() #5 /Volumes/G-DRIVE/LocalSites/kornfeld2/app/public/wp-includes/class-wp-hook.php(310): Fusion_Template_Builder->clean_post_cache(29735, Object(WP_Post)) #6 /Volumes/G-DRIVE/LocalSites/kornfeld2/app/public/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters(false, Array) #7 /Volumes/G-DRIVE/LocalSites/kornfeld2/app/public/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #8 /Volumes/G-DRIVE/LocalSites/kornfeld2/app/public/wp-includes/post.php(7264): do_action(‘clean_post_cach…’, 29735, Object(WP_Post)) #9 /Volumes/G-DRIVE/LocalSites/kornfeld2/app/public/wp-includes/post.php(4621): clean_post_cache(Object(WP_Post)) #10 /Volumes/G-DRIVE/LocalSites/kornfeld2/app/public/wp-includes/post.php(4853): wp_insert_post(Array, false, true) #11 /Volumes/G-DRIVE/LocalSites/kornfeld2/app/public/wp-admin/includes/post.php(445): wp_update_post(Array) #12 /Volumes/G-DRIVE/LocalSites/kornfeld2/app/public/wp-admin/post.php(227): edit_post() #13 {main} thrown in /Volumes/G-DRIVE/LocalSites/kornfeld2/app/public/wp-content/mu-plugins/wpengine-common/plugin.php on line 1348

Steps to reproduce

As precisely as you can, list the steps it takes to reliably reproduce the issue.

Environment Info

Describe your environment.
WordPress 6.3
Avada Theme 7.11.2 Registered
BBPress
WPRocket

MacOS Ventura 13.5.2 on MacMini 16 GB
PHP 8.1.9
Nginx
Mysql 8.0.16
Local 7.1.2+6410

Supporting info

Please provide your Local Log. See this Community Forum post for instructions on how to do so:
Local Log: Filebin | 5sujiutzzkt02th4

Restored site from backup of production, connected to git, then pulled from WP Engine using little cloud icon in lower right.

Include any screenshots or video recordings of the issue to help others reproduce.

Hi @aravenwood

Have you tried deactivating or deleting completely the WPE mu-plugins? It seems like they are conflicting with something on the site based on the error.

You could use WP-CLI for this from Open Site Shell.

Hi Nick - thank you for the response. I hav


Screenshot 2023-09-13 at 1.20.15 PM
e made some progress with this.

There is a directive in wp-config:

define( ‘WP_CACHE’, true ); // Added by WP Rocket

If I set the directive to false, or comment the directive out entirely, the fatal error disappears. This behavior is true regardless of whether WP Rocket is active or inactive.

I tried removing (moving outside of the site file structure) the directories of the various WP plugins (ape-cache-plugin, wpe-wp-sign-on-plugin, and a-engine-common) but that by itself had no impact.

I didn’t attempt to remove the plugins using WP-CLI or through the WP Admin panel as this instance is my main DEV instance tied to our online GIT account.

I did attempt to clone my site within Local, with the idea that I would use WP-CLI on the clone, preserving my main test instance, but the cloning process failed (See screenshots) and I had to restart Local and delete the damaged clone.

Michael

Was this a site you pulled or imported from WPE originally? Did it ever work in Local or was this your first attempt at working on it?

Are your other Local sites also located in the same pathway, /Volumes/G-DRIVE/ ?

Instead of removing or moving any plugins if you just open up your shell and run wp plugin deactivate --all does that work?

Sorry, /Volumes/G-Drive/ is the path to my external SSD. I changed the settings of Local so that LocalSites is located on that drive. All my other Local sites are located there as well.

I was able to deactivate BBPress using

wp plugin deactivate bbpress

It was working previously in Local without the fatal error. How I got it is a bit complicated. The site is from the WPEngine Dev instance. Made a backup using Updraft/Migrator and restored it onto a trusted WP site I created in Local. Then I connected the site to GIT repo for the WPE Dev instance (hosted privately for us). Then I Synced with WPE by clicking on the button in Local seen in the screen capture.
Screenshot 2023-09-13 at 7.16.08 PM

I’m assuming your other sites are working without issue even after moving to the external drive?

I think it might be worth trying the steps below, to see if the site can get “reset”:

  • Export the site into a zip file and save it to your desktop
  • Delete the site in Local
  • Quit and reopen Local
  • Ensure any other sites are all Stopped
  • Reimport the zip backup and see if the error persists

Hi Nick-B - you are correct that none of my other sites on the external drive are exhibiting this behavior.

I will try your suggestion in a couple of days (very backed up with work).

Sounds great! Keep us posted if you have any other questions or issues.