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

Conflict with WordPress Updates screen #247

Open
swissspidy opened this issue Feb 20, 2020 · 5 comments
Open

Conflict with WordPress Updates screen #247

swissspidy opened this issue Feb 20, 2020 · 5 comments
Labels
bug Something isn't working

Comments

@swissspidy
Copy link
Collaborator

I had a few available plugin updates on my site and went to Dashboard -> Updates to install them.

When you run the updater, WordPress displays the progress in an iframe. But when the PWA plugin is installed, I only see the offline template instead of the progress. That is very odd.

@swissspidy swissspidy added the bug Something isn't working label Feb 20, 2020
@westonruter
Copy link
Collaborator

Interesting. Apparently that iframed URL is not in the admin? Apparently the service worker's navigation routing needs to exempt that URL from handling.

@westonruter westonruter added this to the 0.4 milestone Feb 20, 2020
@swissspidy
Copy link
Collaborator Author

It looks like wp-admin/update-core.php iframes wp-admin/update.php, so it actually should be in the admin.

And it doesn't seem to happen every time I install updates, but I definitely recall this happening multiple times now.

@westonruter
Copy link
Collaborator

Ok, actually the admin also serves an offline template when it detects the user is offline. The iframe probably had the offline template and the message said that the server was offline, not the client, right? That offline detection is will have to be improved.

@swissspidy
Copy link
Collaborator Author

I don't recall the wording exactly, but that would explain it I think!

@westonruter
Copy link
Collaborator

Could it be that the error failed with an internal server error? If the service worker doesn't see </html> in the response, then it serves the offline template:

if ( -1 !== responseBody.indexOf( '</html>' ) ) {
return originalResponse;
}

Can you replicate the issue by causing an error during update?

@westonruter westonruter removed this from the 0.4 milestone Mar 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants