-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Remove rest_error_handler #12219
Copy link
Copy link
Closed
Labels
bugIndicates a bug with one or multiple components.Indicates a bug with one or multiple components.compatibility/3rd-partyIndicates a compatibility problem with a 3rd-party plugin or theme.Indicates a compatibility problem with a 3rd-party plugin or theme.status/has-prIndicates that an Issue, or Discussion has a companion Pull Request awaiting to be merged.Indicates that an Issue, or Discussion has a companion Pull Request awaiting to be merged.
Metadata
Metadata
Assignees
Labels
bugIndicates a bug with one or multiple components.Indicates a bug with one or multiple components.compatibility/3rd-partyIndicates a compatibility problem with a 3rd-party plugin or theme.Indicates a compatibility problem with a 3rd-party plugin or theme.status/has-prIndicates that an Issue, or Discussion has a companion Pull Request awaiting to be merged.Indicates that an Issue, or Discussion has a companion Pull Request awaiting to be merged.
Prerequisites
Description
Dear Elementor Support, please remove
rest_error_handlermethod, along withadd_action( 'rest_api_init', [ $this, 'register_rest_error_handler' ] );, because these two methods are causing issues with every plugin, which uses WP REST API.The problem is that when you set the following:
set_error_handler( [ $logger_manager, 'rest_error_handler' ], E_ALL );, you are allowing all errors/notices/warngins to be displayed. From there you show the error message if the WP_DEBUG is enabled or a message to see the System Info of Elementor.It's not ok to show such messages when the debug is disabled.
For example, your hook is used on our plugin page, and you show your message because our plugin generates the following notice:
We know about this warning, and we will fix it soon, but I don't see a reason to show such message in OUR endpoint. Even when the notice is suppressed using
@.At least, if you want to have such error handler, check the error_file param or something else, but do not change the way, how WP debug works.
I will be happy to provide more information or anything else if you need my help.
Regards,
Stanimir
Isolating the problem