I am unable to set my site to PHP 8.0 because toolset blocks keeps throwing up a critical error making the backend inaccessible.
"WordPress caught an error with one of your plugins, Toolset Blocks.
An error of type E_ERROR was caused in line 171 of the file /home3/**********/*****************/wp-content/plugins/toolset-blocks/inc/wpv-plugin.class.php. Error message: Uncaught TypeError: array_search(): Argument #2 ($haystack) must be of type array, null given in /home3/*********/*****************/wp-content/plugins/toolset-blocks/inc/wpv-plugin.class.php:171"
WordPress version 6.0
Active theme: Astra Child (version 1.0.0)
Current plugin: Toolset Blocks (version 1.6.3)
PHP version 8.0.18
I've changed the PHP version back to 7.4 temporarily until we are able to figure out the reason for the error.
I see you are using latest Toolset plugins and its strange that you could not able to switch to PHP 8.
what if you create a staging site that you should setup with PHP 8 and send me the admin and FTP access details for the same.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.
I've renamed the Toolset Block's folder within the plugins folder.
And When I try to login to wp-admin on the staging site you shared, I get the following fatal error:
Fatal error: Uncaught TypeError: array_flip(): Argument #1 ($array) must be of type array, null given in /home3/syanfmsu/staging.theypfoundation.org/wp-admin/includes/menu.php:294 Stack trace: #0 /home3/syanfmsu/staging.theypfoundation.org/wp-admin/includes/menu.php(294): array_flip(NULL) #1 /home3/syanfmsu/staging.theypfoundation.org/wp-admin/menu.php(394): require_once('/home3/syanfmsu...') #2 /home3/syanfmsu/staging.theypfoundation.org/wp-admin/admin.php(158): require('/home3/syanfmsu...') #3 /home3/syanfmsu/staging.theypfoundation.org/wp-admin/index.php(10): require_once('/home3/syanfmsu...') #4 {main} thrown in /home3/syanfmsu/staging.theypfoundation.org/wp-admin/includes/menu.php on line 294
Update:
Also, would you mind to test the issue with only Toolset plugins active and default twentytwentytwo theme?
Hi, I found the issue after digging through the WordPress documentation regarding the array_flip() error. I had written a custom plugin to rearrange the WordPress admin menu which was causing the error. I don't know why the email I received about the critical error said that the issue was with the toolset blocks plugin. Everything works fine after I deactivated the custom coded plugin.
Thanks for the help in troubleshooting this Minesh.