S2member redirects to member options page even when member levels are right

Hi all, we’ve been using s2member for years and years and we’re having an issue we’ve not seen before!

We have a website using the Divi theme, it has a very simple s2member set up, there are 2 member levels and a bunch of pages protected by member level only.

When I’m logged in as level 1 or level 2 I can’t access the pages that “require level 1 or higher” but when I’m logged in as level 2 I can access the level 2 or higher pages.

If I change one of my level 1 pages to a level 2 I still can’t access it when logged in as a level 2…

There are a few other plugins installed. Including WooCommerce, Jetpack and iThemes security, deactivating these doesn’t make any difference.

The site has no caching.

Everything is up to date.

I’m baffled, I know it’s not an s2member bug because it runs fine on all our other sites but I don’t know where to look next without completely duplicating the site and tripping it back…

Any help is appreciated!

It sounds like the problematic pages are also being protected another way, such as by ccap, category, or tag.

I’ve been through the restriction options in the s2member settings and can’t see anything else there that suggests that’s happening…

Take a look at the URL when you are redirected to the MOP. What does that say?

Hi Tim, this is whats on the end of the URL when it redirects to the MOP

/?_s2member_vars=page…level…1…page…1607…L2NhcmVlci1tYXJrL21lbWJlci1hcmVhL3Bvc3QtMTYv&_s2member_sig=1525173811-3ca90850346f9910794d5341f58a4116

Thanks :slight_smile:

That looks as it should do. So my suspicion is that iTheme Security has modified your .htaccess file, and that modification has remained even when the plugin is deactivated.

Hi Tim, I was hopeful about this one, but I’ve just checked and there isn’t anything ithemes security related in my .htaccess!!

# BEGIN s2Member GZIP exclusions
<IfModule rewrite_module>
	RewriteEngine On
	RewriteBase /
	RewriteCond %{QUERY_STRING} (^|\?|&)s2member_file_download\=.+ [OR]
	RewriteCond %{QUERY_STRING} (^|\?|&)no-gzip\=1
	RewriteRule .* - [E=no-gzip:1]
</IfModule>
# END s2Member GZIP exclusions

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

If you have only deactivated your other plugins one at a time, now is the time to do so for them all together, change to a default theme, and clear all caches and CDNs again.

If that still doesn’t work, you should talk to your host.

Hi, not sure but did you try Reset Roles/Capabilities?
I had something similar and that button helped.

I didn’t know about this feature Filip! Unfortuantely it didn’t work :worried:

Looks like I’m going to have to duplicate the site and test it!!

Ok, I’ve duplicated the site on to different hosting, issue still remains. I’ve deactivated all the plugins, removed my mu-plugins and assigned the Twenty Fifteen theme that was installed. The issue is still there.

So I deleted all my plugins, still there…

So I deleted my htaccess and regenerated it, resaved my s2member settings, still no luck.

I’m baffled, is there anything else I can do? I’ve updated s2member, I’m running Pro… :worried:

Is there any [s2If conditionals] on these pages?

None at all…

This is really poor timing for my client so I’m a bit desperate for a solution, the member section of there website isn’t working and at this stage I’m pretty clueless on how to resolve it…

You said the site has no caching. Is your host, perhaps, running caching at the server level?

Hi Tim, I’ve tested in two locations, the live site is on basic shared hosting, and we have other s2member sites on the same sort of hosting. The test site I created, which has the same problems, is on a VPS managed by me and it definiltey has no caching…

Then the only thing I can think of is to check that the right capabilities are being assigned to each role. Filip’s suggestion should already have fixed this, but you could install something like the Capabilities Manager Enhanced plugin to enable you to check.

Thanks for your help Tim, I’ve found the issue!! The links on my member dashboard page were going to http not https, some of these pages then redirect elsewhere and it was obviously having an issue! I discovered if you navigated directly to a page it worked, it was just the link/redirects that were broken!!

I’m relieved to say the least :slight_smile:

Thanks again!

Wow! At least you found the cause of the problem. Thanks for explaining what it was!