johnbillion / user-switching

WordPress plugin that provides instant switching between user accounts.
https://wordpress.org/plugins/user-switching/
GNU General Public License v2.0
187 stars 49 forks source link

Not working on production #68

Closed antonio-petricca closed 3 years ago

antonio-petricca commented 3 years ago

It does not working on the production website. Instead it works for the staging environment (same server).

How can I debug it?

Thank you so much!

johnbillion commented 3 years ago

What exactly doesn't work? Can you provide some info?

antonio-petricca commented 3 years ago

I click on the siwtch link, but the logger user remain the same (the admin).

johnbillion commented 3 years ago

This could be a problem with a caching plugin, or with your cookies. Try clearing all your cookies and of that doesn't work then try deactivating any caching or security plugins.

antonio-petricca commented 3 years ago

Either have the cache enabled by the provider: staging works as expected, production not.

As stated previously, is there a way to debug you plugin?

Thank you so much!

johnbillion commented 3 years ago

I'm very sorry but I'm not sure what the issue could be, and the underlying issue is most likely not with User Switching itself. The plugin is used on 100,000+ sites and I've only seen this reported 4 or 5 times in the last 10 years, and each time it's been due to either a caching plugin or a security plugin interfering with the request to switch the user. I would recommend investigating what differences there are between your staging site and your production site.

antonio-petricca commented 3 years ago

Why you don't answer my question: "is there a way to debug you plugin?"

johnbillion commented 3 years ago

If User Switching shows you an error message then yes you can debug this. If there's no error message, then it means the problem lies elsewhere, as I said most likely in a caching or security plugin that is preventing the request even making it to the User Switching plugin.