publishpress / PublishPress-Capabilities

PublishPress Capabilities gives you control over all the permissions on your WordPress site.
13 stars 3 forks source link

The new test user feature doesn't work and breaks the (working) Uncanny Owl Toolkit User Switching module #1141

Closed ManniGH closed 3 weeks ago

ManniGH commented 6 months ago

Expected Behavior

The "test user" feature is supposed to allow an admin to look at the website front end as if from another user account.

Current Behavior

1) The test user feature doesn't work at all. When you select a user to test, it goes back to the admin panel instead of going to the front end as if the selected user was browsing the website.

2) It breaks the Uncanny Owl "User Switching" module from their Uncanny Toolkit, which stops working and instead behaves in the same way as the "test user" feature of PP Capabilities (does nothing instead of switching to selected user account).

Note: disabling the UO User Switching module doesn't allow PP Capabilities Test User to work as expected.

Possible Solution

1) Fix this bug in Publishpress Capability and 2) Make it possible to entirely disable the user testing feature in PP Capabilities.

Currently, the only way to get UO User Switching to work is to disable PP Capabilities entirely, which isn't desirable of course.

Steps to Reproduce (for bugs)

  1. Select a user in "User Testing"
  2. Instead of switching to the front end as if browsed by the selected user, we stay in the admin panel.

Context

I was trying to test a discount (EDD Discount Pro) assigned to specific user when they are logged in.

Your Environment

WordPress 6.4.3 | PHP 8.1.27 | Apache | MySQL 8.0.36

stevejburge commented 6 months ago

@ManniGH It is possible to disable User Testing now. Go to the "Dashboard" area and uncheck the "User Testing" box

ManniGH commented 6 months ago

Thank you very much, I had looked in settings, not in dashboard. I can confim that disabling User testing in PP Capabilities allows the UO User Switching to work fine again, without have to entirely disable PP Capabilities, so that's a permanent workaround for me.