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

Investigate cURL error appearing on Tools > Site Health check when plugin active #19

Open
unfulvio opened this issue Jul 8, 2019 · 1 comment
Assignees
Labels

Comments

@unfulvio
Copy link
Owner

unfulvio commented Jul 8, 2019

See https://wordpress.org/support/topic/sitehealth-curl-error-28/#post-11708951

Replication steps:

  1. Activate WP PHP Console only
  2. Visit Tools > Site Health check
  3. A cURL error is returned for WP API check - but the WP API works correctly while WP PHP Console is active.

To do:

  1. Investigate whether this is WP PHP Console fault
  2. If yes, maybe add an exclusion to process in that page only?

Low priority.

@unfulvio unfulvio added the bug label Jul 8, 2019
@unfulvio unfulvio self-assigned this Jul 8, 2019
@unfulvio
Copy link
Owner Author

unfulvio commented Sep 30, 2019

Recently had a chance to revisit this issue.

As of WordPress 5.2.3 the errors are shown as follows when WP PHP Console is active:

image

An exclusion may work on the page, but the issue is triggered by a loopback requests in background; therefore, a simple detection of the current page the browser client is seeing won't catch that.

One could probably exclude loading the plugin if REST_REQUEST is loaded, although this may prevent catching other legitimate errors.

To reduce the scope of the exclusion one could match also other request parameters as show in https://wordpress.stackexchange.com/questions/221202/does-something-like-is-rest-exist - the site health check pings wp/v2/types/post currently.

However, loopback requests would still be an issue, because WP PHP Console is also interacting with those, and the site health check issues a remote GET to the admin_url() without much useful info to discern it from other legit requests.

Interestingly enough, the callback test on WooCommerce Status > Tools seems to pass.

For the time being some notice could be displayed while WP PHP Console is active on the site health check, to warn users about a false positive.

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

No branches or pull requests

1 participant