-
Notifications
You must be signed in to change notification settings - Fork 385
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
Use WP Cron to periodically check site URLs for AMP validation #1756
Comments
Integrating with cron shouldn't be too hard I think. Just need to figure out which pages to scan. Instead of (or in addition to) random URLs, I'd love to see periodical checks of the most popular posts. |
I just did the following:
The error message is probably because of my Lando setup, but it's certainly a bit odd to wait that long for the page to reload because the plugin checks the validity of the site right after changing the settings. This would be a great opportunity to use cron as well. It could simply schedule an event 1min in the future or so. |
Yes, I've faced difficulty with timeouts in Lando for the validation requests as well. In particular, it seems the PHP-CSS-Parser performs extremely slowly in the Docker environment. Any intensive PHP computations seem to be very slow. The reason for checking validity synchronously during the settings save is so that any success message can be served back in PHP. It would be better indeed to do it asynchronously after saving and show a spinner on the resulting page once the results are back. For that matter, the whole screen needs to be redone to use the REST API as opposed to the classic full-page-reload from the legacy admin screens. |
There are some small UX things on the settings screen I'd love to improve anyway, so this sounds like a good excuse to do that 😀 |
This is going to be of critical importance once we allow Developer Tools to be turned off. When that happens, validation will no longer be done synchronously when a post is updated. We need for validation errors to still be gathered in an automated way and reported to the administrator in the life of a site, across posts being published and plugins being updated. So here's what I propose:
|
The site health test message can not only flag the count of URLs that have unreviewed validation errors, but also the list of plugins that are causing them. Then the CTA can be to go to the Plugin Suppression section on the admin screen. |
Another CTA could be `Contact System Admin` or similar flow to request
support.
…On Tue, Jun 30, 2020 at 2:56 PM Weston Ruter ***@***.***> wrote:
The site health test message can not only flag the count of URLs that have
unreviewed validation errors, but also the list of plugins that are causing
them. Then the CTA can be to go to the Plugin Suppression section on the
admin screen.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1756 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAD3R2JIB67ENKO22NMMIE3RZJNRBANCNFSM4GLLKNCQ>
.
|
Yeah, we could do a query for the other administrators and list those who have Developer Tools turned on as good candidates to reach out to. |
Depends on #4779. |
re: The discussion we had earlier today about the site scan REST endpoint. I was thinking that if all validation uses the same underlying mechanism, we could potentially solve some problems by working on the cron along with the site scanning for the wizard, etc. in tandem. Maybe we can do something along these lines:
A lot of the underlying code for this already exists, and I've already begun moving the pieces around in #5228 (WIP). |
Yes, this could reduce the perceived time involved to perform the site scan step, if they are happening in the background. We'd need to make sure that WP Cron gets spawned immediately after activation and not wait around for another request, as if the user is activating the plugin for the first time, they may cause WP Cron to spawn when they click the banner to access the onboarding wizard, and the scan results will not yet be available.
The way to determine if a given URL is fresh or not is via
This relates to what @schlessera mentioned in regards to retaining the loopback requests. If you go to the Validated URLs post table screen and select multiple validated URLs, you can do a bulk re-check of those URLs. This will be a batch operation. A problem with doing this, however, is that there can be timeouts. |
Breaking out from #1007 which focused specifically on using WP-CLI to do validation of an entire site.
At the moment AMP validation is only performed in response to editing a post, or activating a plugin. There should be passive validation checks performed so that the user can be informed of issues that arise from adding widgets or making other site changes that do not result in validation being performed. WP Cron can be used to initiate revalidation requests for random URLs of enabled templates. This will make the "At a glance" Dashboard widget much more useful on admin as well, as it will actually highlight new issues that the user isn't already immediately aware of:
Relates to #1755 which is for adding a UI in the admin for bulk validation.
The text was updated successfully, but these errors were encountered: