Hi @pinfsro,
1. Which version of PublishPress Blocks are you using?
2. Go to Blocks menu, then Block Access. Click save Block Access for Administrator user role. See if the warning is gone.
Version is 2.11.3, sorry for not including this.
Yes, this did help, warning is gone. Thank you.
We appreciate your feedback!
Just want to say that I was getting a fatal error trying to activate the customizer with PHP 8 running plugin version 2.11.4 on WordPress 5.9 on WP Engine. I even disabled every plugin but PublishPress Blocks and activated the default theme, and still had the fatal error.
So I rolled back to PHP 7.4, and tried what was recommended above. I went to Blocks –> Block Access, clicked the Save Block Access button, and the issue was sorted. When I switched back to PHP 8, the error was gone. So glad I found this thread!!
Hi @chriscree,
I’m glad this thread was helpful!
If by chance you have the full details to reproduce the issue, we would appreciate it.
Regards
Basically any site that I had running PublishPress Blocks would crash with the below fatal error when I attempted to go into the Customizer. I suspect it was because I never set any Block Permissions in the settings and there was a null value for the $advgb_blocks_user_roles array. I don’t know if you can have the plugin set a default Block Permission that can be changed via the settings to avoid the error?
Anyway, here is the error I got when I set wp_debug to true:
Fatal error: Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array, null given in /nas/content/live/sitename/wp-content/plugins/advanced-gutenberg/incl/advanced-gutenberg-main.php:2480 Stack trace: #0 /nas/content/live/sitename/wp-content/plugins/advanced-gutenberg/incl/advanced-gutenberg-main.php(2480): in_array(‘genesis-page-bu…’, NULL) #1 /nas/content/live/sitename/wp-content/plugins/advanced-gutenberg/incl/advanced-gutenberg-main.php(516): AdvancedGutenbergMain->getUserBlocksForGutenberg() #2 /nas/content/live/sitename/wp-content/plugins/advanced-gutenberg/incl/advanced-gutenberg-main.php(422): AdvancedGutenbergMain->advgbBlocksVariables(false) #3 /nas/content/live/sitename/wp-includes/class-wp-hook.php(307): AdvancedGutenbergMain->addEditorAssetsWidgets(‘widgets.php’) #4 /nas/content/live/sitename/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array) #5 /nas/content/live/sitename/wp-includes/plugin.php(474): WP_Hook->do_action(Array) #6 /nas/content/live/sitename/wp-includes/class-wp-customize-widgets.php(704): do_action(‘admin_enqueue_s…’, ‘widgets.php’) #7 /nas/content/live/sitename/wp-includes/class-wp-hook.php(307): WP_Customize_Widgets->enqueue_scripts(”) #8 /nas/content/live/sitename/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array) #9 /nas/content/live/sitename/wp-includes/plugin.php(474): WP_Hook->do_action(Array) #10 /nas/content/live/sitename/wp-admin/customize.php(123): do_action(‘customize_contr…’) #11 {main} thrown in /nas/content/live/sitename/wp-content/plugins/advanced-gutenberg/incl/advanced-gutenberg-main.php on line 2480
Hopefully that helps some.