Page 1 of 1

Adding Membership Levels not working

PostPosted: January 10th, 2012, 11:34 am
by timmay
I searched the forums and have not found anyone else with this problem.
Wordpress 3.3.1 and S2Member Pro 111220

I added define("MEMBERSHIP_LEVELS", 7); to my wp-config.php file, directly below the opening php tag and saved.
Now when I navigate to any S2Member page in the admin interface, I just get a blank white page. no error, nothing.

If I remove the line from wp-config.php, everything works again, but of course I don't have my 7 levels.

Please help as this is the only reason I purchased the Pro version...
Thanks,
timmay

Re: Adding Membership Levels not working

PostPosted: January 10th, 2012, 11:41 am
by timmay
Crazy.. I just resolved this myself. I had previously tried inserting the line at the end of wp-config.php, which appeared to not get read at all by the s2member plugin.
On a whim, I tried inserting it at line 37, which makes no sense because that is in the db settings, but it worked. I now have my seven levels in the membership levels section.
timmay

Re: Adding Membership Levels not working

PostPosted: January 11th, 2012, 2:11 pm
by Raam Dev
Hi timmay,

As described in WP Admin -> s2Member -> General Options -> Membership Levels/Labels, the line should be inserted at the top of your /wp-config.php file, right after the <?php tag.

Re: Adding Membership Levels not working

PostPosted: January 11th, 2012, 2:45 pm
by timmay
As described in my first post -- I did follow instructions and inserted the line
right after the <?php tag
That is precisely what didn't work, and why I turned to the forum.
Ironically, as described in my second post, removing it from right after the <?php tag, and moving it farther down the wp-config.php file is what made it finally work....but whatever.

Re: Adding Membership Levels not working

PostPosted: January 11th, 2012, 3:29 pm
by Eduan
Did it look like this?:
Code: Select all
<?php define("MEMBERSHIP_LEVELS", 7); 

Or did it look like this?:
Code: Select all
<?php
define
("MEMBERSHIP_LEVELS", 7); 

The first one is incorrect, the second one is correct (because of the positioning of the code after the <?php). Well it's incorrect in large files, or I consider it bad practice.

Re: Adding Membership Levels not working

PostPosted: January 11th, 2012, 3:30 pm
by Raam Dev
Oh, my apologies for the confusion. I was reading your second post that said,

timmay wrote:I had previously tried inserting the line at the end of wp-config.php, which appeared to not get read at all by the s2member plugin.


This is what I tried and it works for me:

Code: Select all
<?php
define
("MEMBERSHIP_LEVELS", 7);
/**
 * The base configurations of the WordPress.
 *
....

Re: Adding Membership Levels not working

PostPosted: January 11th, 2012, 3:48 pm
by timmay
Eduan wrote:Did it look like this?:
Code: Select all
<?php define("MEMBERSHIP_LEVELS", 7); 

Or did it look like this?:
Code: Select all
<?php
define
("MEMBERSHIP_LEVELS", 7); 

The first one is incorrect, the second one is correct (because of the positioning of the code after the <?php). Well it's incorrect in large files, or I consider it bad practice.


It looked like the second one.
Thanks.