Skip to content

Proactively warn when loopback requests are not working #3789

@westonruter

Description

@westonruter

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    BlockedEnhancementNew feature or improvement of an existing oneGroomedP2Low priorityWS:CoreWork stream for Plugin core

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions