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

Admin panel not loading pages correctly when plugin activated #223

Closed
JamieDixon opened this issue Sep 30, 2019 · 4 comments · Fixed by #279
Closed

Admin panel not loading pages correctly when plugin activated #223

JamieDixon opened this issue Sep 30, 2019 · 4 comments · Fixed by #279
Milestone

Comments

@JamieDixon
Copy link

JamieDixon commented Sep 30, 2019

Hi there,

Thank you for this plugin. Having the ability to register service workers within Wordpress is sorely needed and I'm very thankful that this plugin helps us with that.

I've recently noticed that some of our admin pages do not load when this plugin is activated. Instead, the browser is served the current page.

I'm not totally sure what's happening. The URL sometimes changes to the new, expected URL. Other times the browser refreshes as if the new page is about to load but the existing page is returned instead with the original URL.

All of this is a little vague but I'm hoping that someone might have seen similar behaviour before and knows what the issue might be.

If I check the "Bypass for network" checkbox in Chrome Dev tools, everything goes back to working correctly. Similarly if I disable the PWA plugin, everything works as expected again.

Our use case for the PWA plugin is to load a custom service worker. At the moment, the plugin that creates that service worker is also disabled, so shouldn't be having any impact on this issue.

Thank you for any help and I hope I've got the right place for support. If this needs to be a StackOverflow question please let me know.

Again, thank you for all the work going into this plugin.

Wordpress Version: 5.2.2
PWA Plugin Version: 0.3.0

Here's a gif demonstrating what happens when I'm on the Dashboard and I click the Plugins menu item. The page refreshes but the Dashboard is displayed again instead of the Plugins page.

AScreen Recording 2019-09-30 at 13 54 31

Update

If I hit the plugins url directly, I'm redirected back to wp-admin/index.php.

Update 2

It only seems to be doing this with the PWA plugin activated and Chrome Dev tools open. Closing the Dev Tools, or disabling the PWA plugin resolves the issue.

@westonruter
Copy link
Collaborator

I wonder if it is due to the service worker having variable content in it, causing it to reload continuously. Does the page just continue to reload even without navigating anywhere? If so, it may be related to this issue: #183. Can you repeatedly request the admin service worker script URL and check to see if it is changing with each request?

@JamieDixon
Copy link
Author

@westonruter Thanks for your thoughts.

I've narrowed the issue down to having "Update on reload" enabled for the service worker in Chrome Dev Tools.

Re-loading the admin script seems to return the same result for me (I ran it through a diffing tool a few times and no differences were found). I haven't seen any issue with the page reloading without navigating.

@westonruter
Copy link
Collaborator

I believe this is the same issue as #249.

@westonruter
Copy link
Collaborator

I've opened a PR to fix this and have a build for testing: #279 (comment).

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