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

Proactively warn when loopback requests are not working #3789

Closed
westonruter opened this issue Nov 18, 2019 · 3 comments
Closed

Proactively warn when loopback requests are not working #3789

westonruter opened this issue Nov 18, 2019 · 3 comments
Labels
Blocked Enhancement New feature or improvement of an existing one Groomed P2 Low priority WS:Core Work stream for Plugin core

Comments

@westonruter
Copy link
Member

westonruter commented Nov 18, 2019

Feature description

When a site is unable to perform loopback requests, various parts of WordPress break including scheduled events and the theme/plugin editor. Something else that breaks is the AMP plugin is unable to perform validation requests. At the moment when validation requests fail, a cryptic message can be displayed including:

Failed to fetch URL(s) to validate. This may be due to a request timeout. Please check your server's PHP error logs; to do this you may need to enable WP_DEBUG_LOG.

We need to be more proactive than showing this message when trying to validate. The Site Health functionality includes a test for this:

image

Similar to how it proactively warns about the lack of HTTPS (#3219) and external object cache (#1050), we need to do the same for loopback requests. The first time that the AMP plugin is activated, this check should be done and if failed a warning should be shown on the plugin activation screen. Otherwise, or in addition, whenever landing on the AMP settings screen the test for loopback requests (and perhaps for HTTPS) should both be done and show the results.

When validation requests fail due to loopback requests failing, then we should explicitly mention this rather than saying something general about timeouts.

Relates to #1371 and #2199.


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

Implementation brief

QA testing instructions

Demo

Changelog entry

@westonruter
Copy link
Member Author

We can eliminate the need for this if we abandon the use of loopback requests for validation checks: #4979. I'm working on designing the validation REST API in a way that we can eliminate the need for it.

cf. #5751 (comment)

@westonruter
Copy link
Member Author

See also #5099 which is for adding a Site Health check for this.

@westonruter
Copy link
Member Author

Closing in favor of #5099 and the intention to move toward non-loopback user-initiated validation requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blocked Enhancement New feature or improvement of an existing one Groomed P2 Low priority WS:Core Work stream for Plugin core
Projects
None yet
Development

No branches or pull requests

2 participants