Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
LoganStrike opened this issue Apr 9, 2021 · 1 comment

Comments

@LoganStrike
Copy link

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
Copy link
Author

LoganStrike commented Oct 28, 2021

I'm getting a similar error as reported above, although there is no API error in this case and the stack trace is not identical. It looks like it may be related so I'll post it here. Let me know if this needs to be a separate issue instead.

WordPress 5.8.1
Impress 3.0.6

[28-Oct-2021 03:58:43 UTC] PHP 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:803

Stack trace:

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

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

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

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

#4 /www/wp-admin/edit-form-blocks.php(252): 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 803

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants