Users can't access protected pages - always redirecting to sign-up page

Hi
I am using S2member pro and using a pro-form to allow users to signup as level 1 members (including creating a password).
I have protected some pages with level1 but whenever a user signs in they get redirected to the signup page and are unable to access the level1 protected pages (and the login welcome page). I have tried setting the welcome page using the drop-down and using a redirect URL to no avail - I think the problem is just that they don’t have access (although users are showing up as having S2member level 1 role in the control panel).
I have spent a week on this trying progressively more complex solutions (I am only using pro-forms because I had a similar problem with simpler approaches).
I would really appreciate some pointers…
Thanks

PS I am on a multisite installation WP 4.5.2 on ubuntu 14.04LTS apache2 & MySQL 5.5

I’m at my wits end here - Basically whatever I do I get screwed. As soon as I introduce a login welcome page all links to any s2member restricted pages get redirected to the sign-in form:
http://www.blah/course-sign-up-options/?_s2member_vars=sys..level..0..page..3243..L2blahblah
This is when I have signed up and paid for level 1 access.
I’ve tried everythng I can think of

Andy, can you post that URL in full, please? While it might seem like blah, blah to you, it actually carries information that can be useful for debugging.

The most likely cause is a conflict with a theme or plugin. This post describes how to diagnose the culprit. Just replace references to “The Events Calendar” with s2Member.

Thanks for getting back Tim…
Here is the full text of the redirection URL:
http://www.blah.com/course-sign-up-options/?_s2member_vars=page..level..0..page..3218..L2hvbGxvdy1ib25lLW9ubGluZS1jb3Vyc2Uv&_s2member_sig=1464362876-72ada96cab2aa5fb5e083f4834279a1b
…if you can get any info out of that ‘blah’ I will be impressed indeed!

Thanks for the suggestion to strip back to basics and see if it works then - this however is not, and in my experience NEVER, a practical option - this is a live site on a live multisite containing dozens of other live sites. If I switch to another theme and switch off plugins (just for this site) I will undoubtedly lose half my plugin configs (which there is no simple method of backing up and restoring) and so not only have downtime but spend half a week getting it back to working when I switch back. Not your fault (and sorry for ranting) but this is part of what drives me bonkers when using Wordpress- plugin conflicts and no usable methods of detecting them when they occur (often) - that and the fact that stuff breaks almost every time there is an upgrade!.. :frowning:

Andy,

No-one ever expects you to strip back a live site. What is expected is that you have a clone for testing stuff on. For example, you can create a clone that runs on your own PC. Then you can mess with everything you like before attempting to change a setting on a live site.

OK - bit of a job - I gave up developing on local PC years ago coz it was hard to match the two installations…
I guess I would need to setup hosts file on local PC to redirect domain to localhost and add a vhost record to local apache… hmmm…
I spose it would help to have it around. Not gonna do it friday night though (I’m in UK).
Thanks

It’s not as hard as that! If you’re on a Linux distro, you can just install WordPress natively. You’ll find instructions via Google according to the distro you’re using. Then you just use a cloning plugin to copy over the whole site and redirect hyperlinks. (Of course, if you use relative hyperlinks, it also makes copying and pasting between sites possible when you want to make small changes.)

If you’re on Windows or a Mac, I’d suggest using DesktopServer. That does all the hard work for you, and then you just create a site as usual, and install the cloning plugin as before.

I can’t see any problem with that redirect, so I think testing on a cloned site is your best bet.

It appears that it is not just the new members who can’t login to the site, but anyone - including admin. Looks like s2member has seriously f£$%d it. If I can’t sort it out soon I’ll have to deactivate and give up.

Meanwhile - on the topic of cloning - I don’t think there are any cloning plugins to clone a multisite! (if there are I expect they’re pricey)…
I have WAMP running on my Windows PC here - have just spent a day importing the wordpress database and copying the file structure. Broke mysql (5.5 vs 5.6)…
I sense the fun is only just begun! wordpress plugin joy… :frowning:

Actually, UpdraftMigrator can clone/migrate a multisite (provided the clean target site is already installed for multisite). And it’s only $30, or comes included with the full bundle of extras.

I have been using s2Member and active on the forums for years now. Every so often, someone claims it’s messed up their site. Yet the cause for such a problem has never turned out to be s2Member, which isn’t too surprising since it doesn’t actually handle logins. It leaves that to WordPress itself.

My guess, on the limited information here, is that your .htaccess file is corrupted.

Hi Tim
I have now got (a manually cloned) copy of the multisite working on my local PC (added vhost and amended hosts file so everything arrives at the right place) and am now disabling stuff to see if I can make it work.
FYI my .htaccess file looks like this:

BEGIN s2Member GZIP exclusions

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

BEGIN WordPress

RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L]

uploaded files

RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

add a trailing slash to /wp-admin

RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).) $1 [L]
RewriteRule ^[_0-9a-zA-Z-]+/(.
.php)$ $1 [L]
RewriteRule . index.php [L]

END WordPress

php_value upload_max_filesize 50M
php_value post_max_size 50M

…any clues there?
Thanks
Andy

PS sorry for some reason the commented sections show up here in h1…

There’s three things that look strange to me. I’m not sure about the last of those, so I’ll just stick to two suggested edits for now. Of course, please make a backup before you edit them!

I’d suggest changing these lines:

RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
RewriteRule  ^[_0-9a-zA-Z-]+/(.*.php)$ $1 [L]

to these:

RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $2 [L]
RewriteRule  ^[_0-9a-zA-Z-]+/(.*.php)$ $2 [L]

I think this row should be like this:

RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) $1wp-includes/ms-files.php?file=$2 [L]

All other rows seems good to me…

Thanks for responding guys - neither of those suggestions (or both) made any difference. What I don’t get is that I’m logged in as superadmin on the main site and in the past I could always just switch to the dashboard of this site, but now it just takes me to the login page and I don’t show as logged in at the top…
strange…

OK, let’s just rule out a browser issue. Which one have you been using so far? Could you try accessing the site from a different browser?

Also take a look at this: https://tommcfarlin.com/resolving-the-wordpress-multisite-redirect-loop/

Oh man! I have been using chrome ( 50.0.2661.102) - I just tried Firefox (46.0.1) and it worked! …both on my local and the remote installation… Also works using IE…
So switched to incognito mode in chrome and low and behold I was able to login to the site again. logged out of incognito, cleared the cache and passwords and was still able to login!

Thanks for the heads-up - doh!

NB: now I’m just back to the previous problem, which is whenever I log in a signed-up level 1 member I get redirected to the signup page - still that’s progress!?

I think domain mapping is your remaining problem, Andy. See this: https://wordpress.org/support/topic/plugin-wp-multi-network-wp-signupphp-redirect-loop?replies=16

The local copy now works fine with the domain mapping plugin active (and the original htaccess). It’s just the remote copy that is doing my head in - has gone back to not letting me login with chrome… Is s2member incompatible with chrome in some way?
It’s doubly confusing because chrome always responds immediately to hosts file changes (when I switch between the local and remote version) whereas firefox doesn’t…

Yes, that often confuses me too! But s2Member works fine with Chrome. In fact, that’s what most of my members use. Have you tried disabling s2Member and trying to login then? Do you still get the redirect problem?

I am at my wits end here. have been forced to try using pro forms because the straightforward paypal buttons didn’t work (I got no signup emails). But I am getting nowhere with pro forms - just getting redirected back to the signup page after paying.
Could there be a problem because I only have an http:// url and not an https:// one? I am not allowing credit/debit card payments on the form, only the paypal option… Is paypal looking for an https:// return address or something?
I now remember going through the same sort of convoluted nightmare last time I tried to use s2member some years ago. Wishing I never started :frowning: