wordpress-plugin icon indicating copy to clipboard operation
wordpress-plugin copied to clipboard

When API error 401 is present, the block editor is broken due to fatal error regarding WP_Error

Open LoganStrike opened this issue 3 years ago • 1 comments

Description

When the following error appears on the IMPress Initial Settings page in WP Admin, the WP block editor is also broken, preventing all pages from being edited:

Error 401: Access key is invalid or has been revoked, please ensure there are no spaces in your key. If the problem persists, please reset your API key in the IDX Broker Dashboard, or contact [email protected]


Notice: Trying to get property 'name' of non-object in /www/wp-content/plugins/idx-broker-platinum/idx/register-blocks.php on line 824

Notice: Trying to get property 'uid' of non-object in /www/wp-content/plugins/idx-broker-platinum/idx/register-blocks.php on line 824

Notice: Trying to get property 'name' of non-object in /www/wp-content/plugins/idx-broker-platinum/idx/register-blocks.php on line 824

Notice: Trying to get property 'uid' of non-object in /www/wp-content/plugins/idx-broker-platinum/idx/register-blocks.php on line 824

Fatal error: Uncaught Error: Cannot use object of type WP_Error as array in /www/wp-content/plugins/idx-broker-platinum/idx/register-blocks.php:752

Stack trace:

#0 /www/wp-content/plugins/idx-broker-platinum/idx/register-blocks.php(463): IDX\Register_Blocks->get_agents_select_list()

#1 /www/wp-includes/class-wp-hook.php(287): IDX\Register_Blocks->impress_carousel_block_register_script('')

#2 /www/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array)

#3 /www/wp-includes/plugin.php(484): WP_Hook->do_action(Array)

#4 /www/wp-admin/edit-form-blocks.php(395): do_action('enqueue_block_e...')

#5 /www/wp-admin/post.php(187): require('/www/wp-admin/e...')

#6 {main} thrown in /www/wp-content/plugins/idx-broker-platinum/idx/register-blocks.php on line 752

Steps to Reproduce

  1. Requires an invalid or revoked API key. Once the 401 error is displayed in WP admin, try to edit any page with the default block editor.

Versions

WP: 5.6.2 PHP: 7.3 IMPress: 2.6.7

LoganStrike avatar Apr 09 '21 23:04 LoganStrike