PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

User role capabilities cleared at update

Common Questions/Problems/Tips. Posted by Administrators & Support Reps.

User role capabilities cleared at update

Postby uabclst » July 20th, 2011, 10:29 am

Hi,

I've been using s2member for a while (now upgraded to Pro) and one thing that bothers me is that the user roles s2member_level0, s2member_level1... etc get their capabilities reset every time I update the plugin (or when adding Pro).

I have different capabilities for different roles for my clients that get access to the wp admin view. Each time I update, all capabilities are reset to "read". Then I get complaints from my clients who suddenly can't access the wp editor.

Is it really necessary to clear role capabilities at the updates?

Thanks
User avatar
uabclst
Registered User
Registered User
 
Posts: 5
Joined: July 20, 2011

Re: User role capabilities cleared at update

Postby Cristián Lávaque » July 20th, 2011, 7:59 pm

Oh, I'm guessing you haven't enabled the Deactivation Safeguars, it's at the very top of the General Options panel. WP Admin -> s2Member -> General Options -> Deactivation Safeguards

Turn that on and your s2Member settings will still be there after the updates.

I hope that helps. :)
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: User role capabilities cleared at update

Postby doctorproctor » July 20th, 2011, 10:58 pm

Curious if this works for others...just noticed the same on my site, and deactivation safeguards were set to yes...

Jim
User avatar
doctorproctor
Registered User
Registered User
 
Posts: 37
Joined: May 18, 2011

Re: User role capabilities cleared at update

Postby Cristián Lávaque » July 21st, 2011, 12:46 am

Are you positive it was set to yes? Were your s2Member settings reset? From what to what version did you upgrade s2Member?
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: User role capabilities cleared at update

Postby uabclst » July 21st, 2011, 1:37 am

Mine was set to yes too ( Yes, safeguard all data /options).

I have noticed it at several updates. My last was to Version 110710 (don't remember from which version, but i tend to update regularly so it was probably from the previous version).
Then again when I upgraded to s2Member Pro v110710 it happened again.

I use the "User Role Editor 3.1.1" to set the role capabilities.

Thanks
User avatar
uabclst
Registered User
Registered User
 
Posts: 5
Joined: July 20, 2011

Re: User role capabilities cleared at update

Postby Cristián Lávaque » July 21st, 2011, 1:48 am

Thanks. I'll let Jason know in case it's a bug.
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: User role capabilities cleared at update

Postby Cristián Lávaque » July 21st, 2011, 1:51 am

Could you list the other plugins you're using? Have you tried an update with the other plugins deactivated to see if you lose the s2Member settings then too?
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: User role capabilities cleared at update

Postby Jason Caldwell » July 21st, 2011, 7:00 pm

Thanks for the heads up on this thread.

Yea, this is something new that was introduced in the latest versions of s2Member. Now that s2Member supports an unlimited number of Levels ( with s2Member Pro installed ), it's important for s2Member to reconfigure it's Roles/Capabilities each time it's reactivated, for various reasons. However, we do understand that in some situations this is not desirable ( particularly when/if you've made custom modifications to your Roles/Capabilities ).

To prevent this from happening to your client, please create this directory and file:
/wp-content/mu-plugins/s2-hacks.php
Code: Select all
<?php
add_filter
("ws_plugin__s2member_lock_roles_caps", "__return_true");
?>
* Add this file after s2Member is installed/activated.
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: User role capabilities cleared at update

Postby doctorproctor » July 21st, 2011, 7:10 pm

Thanks, Jason! Added this to my existing s2hacks.php, which shouldn't affect the existing code (re. remove_action ["add_meta_boxes"...]).

Jim
User avatar
doctorproctor
Registered User
Registered User
 
Posts: 37
Joined: May 18, 2011

Re: User role capabilities cleared at update

Postby uabclst » July 22nd, 2011, 3:34 am

Thanks, I'll try this.
User avatar
uabclst
Registered User
Registered User
 
Posts: 5
Joined: July 20, 2011


Return to Common Questions/Problems/Tips

Who is online

Users browsing this forum: No registered users and 2 guests

cron