Home › Forums › Community Forum › Capabilities wiped out post upgrade
Tagged: v120213 upgrade capabilities
This topic contains 15 replies, has 4 voices. Last updated by  Jason (Lead Developer) 4 years, 10 months ago.
| Topic Author | Topic | 
|---|---|
| Posted: Thursday Feb 16th, 2012 at 4:55 am #5352 | |
| 
					
					 | 
			|
| 
					 I just upgraded to v120213 Pro and it appears that all the user capabilities assigned to different levels were wiped out. I haven’t checked custom capabilities I added to specific users, but I can see that the capabilities I added to various levels are all gone.  | 
			|
List Of Topic Replies
| Author | Replies | 
|---|---|
| Author | Replies | 
| Posted: Thursday Feb 16th, 2012 at 12:14 pm #5375 | |
| 
			
			 | 
	|
| 
			 So I went through each level and added back the correct user capabilities, but something else odd is wrong (and very problematic). I noticed that the admin cannot access a page that is restricted to Level 4. I get sent to the membership page like any user that cannot access the page. A level 4 user can access it, but the admin (which has access to level 4 – I double checked the user capabilities) cannot.  | 
	|
| Posted: Thursday Feb 16th, 2012 at 12:33 pm #5380 | |
| 
			
			 | 
	|
| 
			 I think the access to the level 4 page is working now, not sure what changed, although I did log out and back in.  | 
	|
| Posted: Thursday Feb 16th, 2012 at 11:57 pm #5438 | |
			
			![]()  | 
	|
| 
			 Hi Philip, Are you still having an issue or did you solve it?  | 
	|
| Posted: Tuesday Feb 21st, 2012 at 9:04 am #5856 | |
| 
			
			 | 
	|
| 
			 Raam, I fixed it only be re-adding the capabilities using User Role Editor. This took a little trial-and-error as I had to add back capabilities for different levels from memory. I’m a little afraid to upgrade now to the latest version, as I don’t want this to keep happening. Is whatever you changed with capabilities going to occur on every upgrade?  | 
	|
| Posted: Wednesday Feb 22nd, 2012 at 2:31 am #5919 | |
| 
			
			 | 
	|
| 
			 Another odd problem is I just tried to go to a page that is restricted to Level #4, using an Administrator account, and I got redirected to the Membership page.  | 
	|
| Posted: Wednesday Feb 22nd, 2012 at 3:00 am #5921 | |
| 
			
			 | 
	|
| 
			 Going to the page a second time showed it properly. Weird, but still a bug of some kind.  | 
	|
| Posted: Wednesday Feb 22nd, 2012 at 11:07 am #5946 | |
			
			![]()  | 
	|
| 
			 Hi Philip, You definitely should not have lost any Custom Capabilities or any other configuration when you upgraded s2Member. Could you please check to make sure Deactivation Safeguards are enabled? WP Admin -> s2Member -> General Options -> Deactivation Safeguards I also suggest clearing your browser cache if you’re noticing inconsistencies in what you have access to.  | 
	|
| Posted: Thursday Feb 23rd, 2012 at 6:57 am #6107 | |
| 
			
			 | 
	|
| 
			 I did check the deactiviation safeguards before upgrading. Obviously I should not have lost custom capabilities, but it happened. Is no else reporting this problem?  | 
	|
| Posted: Thursday Feb 23rd, 2012 at 2:30 pm #6147 | |
			
			![]()  | 
	|
| 
			 Hi Philip, I have not heard of any other reports of that happening. I personally use s2Member with custom capabilities on my site and I did not experience that issue when upgrading. It’s possible this could be related to a strange server configuration with your web host. I recommend doing a database backup before your next upgrade and seeing if it happens again. If it does, I recommend contacting your web host and explaining the issue.  | 
	|
| Posted: Friday Feb 24th, 2012 at 11:36 pm #6383 | |
| 
			
			 | 
	|
| 
			 Philip, what version did you have before the upgrade?  | 
	|
| Posted: Wednesday Feb 29th, 2012 at 2:50 am #6736 | |
| 
			
			 | 
	|
| 
			 Whatever the previous version was. I generally don’t skip updates.  | 
	|
| Posted: Wednesday Feb 29th, 2012 at 3:21 am #6740 | |
| 
			
			 | 
	|
| 
			 Got ya. I’ll email Jason asking him what he thinks could have caused that problem for you.  | 
	|
| Posted: Wednesday Feb 29th, 2012 at 10:58 pm #6850 | |
			
			![]()  | 
	|
| 
			 Thanks for the heads up on this thread. 
 Yes, by default, s2Member will update it’s core Roles/Capabilities during an upgrade. However, if you’ve made custom modifications to these s2Member Roles/Capabilities, you can lock them in to prevent modification during future upgrades. You’ll find this documented in your Dashboard here: See also, this thread please: Instructions:Create this directory and file: 
			 | 
	|
| Posted: Saturday Mar 3rd, 2012 at 5:41 pm #7195 | |
| 
			
			 | 
	|
| 
			 Thanks. I’ve added the s2-hacks.php file with the code. Perhaps this would be better as a checkbox in the Membership Levels/Labels section? Why exactly does s2member clear all the user capabilities in the first place?  | 
	|
| Posted: Tuesday Mar 6th, 2012 at 1:17 am #7383 | |
			
			![]()  | 
	|
| 
			 KB article published covering this topic.  | 
	|
This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.








Pre-Sale FAQs
Video Tutorials
Community Forum
Knowledge Base
News/Updates
s2 Codex / Docs
GPL v2 License
Contact A Human
About Us
Our Customers
Support Policy
Privacy Policy

