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
Changing any WordPress user's role resets all Edit Flow user group memberships #116
Comments
I haven't been able to reproduce this bug. I've tried the following scenarios, please tell me if I'm attempting to recreate it incorrectly:
Second Scenario
Is there another scenario that should be tested? |
worksforme |
Reported again in the forums. I'm going to write unit tests for user groups to see if I can catch the edge case where this is happening. |
Two years later, this is still happening for customers. Has Edit Flow been abandoned? A heads-up would be nice so that we can start looking for alternatives... Happy to provide access to our staging copy to observe this bug if it means a fix, but no activity since Jan suggests that we're on our own here... |
@karucifer Curiosity: have you or a plugin you are running altered the permissions associated with any of the standard WordPress roles? I've found that causes issues like this in other plugins. |
I can reproduce this 100% of the time by simply changing passwords via /wp-admin/user-edit.php I've also tested it on a fresh install with only Edit Flow present. Each time all user group memberships are eradicated. The only plugin we use that touches users is Force Strong Passwords, mandated by WPEngine. As I said, happy to offer access to our environment if others want to replicate. |
This issue breaks one of the key features for us, are there any workarounds? |
@karucifer and @pixeldynamo I am also experiencing this on a production server from one of my clients, but it's not a standard Wordpress install. Our setup has some sort of load balancer in front of it and redirects traffic based on different urls. We are also using WP Engine. I can't reproduce this locally or on a staging server that has a simple Wordpress install. Can I get some info about your environments? That may help narrow down what our common factors are that would cause this to break. |
Also a WPEngine customer, although we've replicated it in our staging and Dev installs which don't include any of the varnish/nginx stuff that WPE does. |
@pixeldynamo thanks! I figured out what is causing the issue. WP Engine's object cache is causing the problem. If we disable it, user groups don't get blown away. I made a screencast to demonstrate this. It's a brand new site spun up on wp engine with only the edit flow plugin enabled. https://www.youtube.com/watch?v=jFGN2lJhyLg&feature=youtu.be edit: You don't even have to make any changes to a user to make the user groups empty. All you have to do is click Save Changes on a user profile page. |
There hasn't been an update to Edit Flow for over a year. I'm not sure about the particulars of the license but automattic appears to be developing it behind closed doors now for WordPress VIP. Our only hope/option is for WPEngine to implement some kind of fix. On 2 Jun 2015 18:34 -0700, Richard Dinhnotifications@github.com, wrote:
|
Hey @pixeldynamo. Nothing is happening behind closed doors :). There have been updates, though no official releases on the WordPress.org repo. If you want to submit a pull request for this, we'll be more than happy to review for merge. |
I've opened a ticket on WP Engine to see what they have to say and I'll update when I get a response. |
I believe the source of this issue is strictly object caching related and not tied to a particular host. However @pixeldynamo's mention of this issue not occurring in WP Engine's staging environment (which doesn't have object caching included) may be the result of some other behavior that isn't captured in my noted here below. The suspicion of object caching being responsible is based on the following:
The source of the compatibility issue with object caching appears to ultimately reside in the following code in the plugin's wp-content/plugins/edit-flow/common/php/class-module.php script:
The plugin's user group allocation data (in a base64_encoded + serialized form) is kept in the wp_term_taxonomy database table. WordPress will add the results of the get_term_by call in line 832 to the object cache. Consequently the Edit Flow plugin is receiving stale data and then updating all groups with that stale data as part of a user profile update. I was able to resolve the issue in my testing by adding the following line above this function call:
Though a more robust option would be to find the relevant term id and instead use wp_cache_delete($id, self::taxonomy_key) to selectively delete only the pertinent set of data. |
Thanks. I just wanted to give kudos to @futuernorn from WP Engine support for being quick to respond and find a solution. |
Hello everyone 👋 |
@jeffwecan's explanation is very plausible. However, there were changes to I tried to reproduce steps shown in the video locally but couldn't, and looks like the issue was/is isolated to WPEngine. This issue is very old and without the means to reproduce it, as a part of our maintenance effort I have to close it. In case this is still happening on WPEngine, or anywhere else, please open a new issue mentioning this one. |
I set up a new user, User A, with a 'Contributor' role. Then added 2 preexisting editors to one user group and 2 different editors to another user group. I then changed User A's role to 'Author'. A check of Edit Flow's user groups at this point shows that the groups have forgotten their members and now show as having 0 members.
If I duplicate the situation, the same bug presents. It seems to occur no matter what level user's role you change or which role you change them to. A role change on any user erases the membership lists of all user groups (creating or deleting a user does not).
The text was updated successfully, but these errors were encountered: