S2 set up with SSL vs NOT Causes Problems with Welcome Page

I set up S2 using a domain with an SSL applied to it. When logging into the site, it takes the member to the
membership options page and not the my account page.

I’ve set up several test sites trying to find out what was going on and compared every aspect of the plugin setup and and all matched exactly to the original setup but the test sites took the member to the my accounts page as it should.

So, it looks like the only difference is the fact that one is setup on a SSL domain and one is not. The site is already live with members.

Is there a way to fix it so it takes member to the my accounts page without having to uninstall the WP install and then re-installing again. I don’t want to lose my content.
Thanks
Marie

Two things I suggest you check:

  1. In your WP General Settings, make sure you have set both WordPress Address (URL) and Site Address (URL) to begin with https://

  2. In your site’s wp-config.php file, make sure you have you added the following line:

define(‘FORCE_SSL_ADMIN’, true);

1 Like

I had all that except the define in the config file. It did not work.
So I thought, well, lets take out the https out of WP settings and go to http and lo and behold it worked. Too funny.

Thanks for your suggestions. That’s what set me on the right track. However, it looks like this could be a bug in the
S2 member plugin that we cannot create a WP site using https or it will automatically redirect to the membership
options page.

No, there’s no bug there. I run all my s2Member sites on https.

I can tell you what the problem with your site is. But you’ll need to do what I said above and then troubleshoot the cause of the remaining issue step by step. I’ll help, but it might take a few more steps.

What happens is that WordPress actually creates two versions of your site: one on http and one on https. So far as WordPress and plugins are concerned, these are actually two different sites.

So the problem you are seeing is this. A member is logging in on (say) http and being directed to the LWP that is on https. Since that is treated as a different site, s/he is then sent to the MOP.

So the first step, in addition to what I said before, would be to check whether users are logging in from a page that is on http (which you don’t want) or https (which you do).

Thanks Tim. I doubled checked the registration url and it does contain the https since that is how I created the WP site in the first place. I have added define(‘FORCE_SSL_ADMIN’, true); to my config.php.

Right now, however, I do have the WP settings set to http not https.

What’s the next step?

You will need to change both the Settings to https. Do them both before saving. You will then be logged out immediately (because you were on http and now you’re saying it should be https).

But you should be able to log back in with the same username and password as before. Let me know what happens when you do.

Did as you said. switched back to https on general settings and it did NOT log me out.

Ah, that’s because you had already added that line to wp-config.php. So you must already have logged in on https.

What I’d suggest now is going to the Login Welcome Page. Does the URL start with https? Are you getting any warnings in your browser?

login welcome is https and always was. it never changed and there are no warnings.

Good! Now I’d Enable MOP Vars (in s2Member -> General Options -> Membership Options Page) and try to log in as someone with an s2Member user role (i.e. not as admin).

You can do this another browser if you don’t want to log out as admin.

MOP was never disabled throughout all this. I did login using firefox and it takes me to the membership options, not the welcome page.

I didn’t say create a MOP page. I said turn on MOP Vars.

If you have them on and are directed to the MOP, you should get a long string posted as the URL. Please post that here.

MOP was turned on. Didn’t have to do it. I am not getting a long string psted as the url. Maybe not looking in the right place.

Are the MOP Vars turned on? That’s not the page itself, but a specific setting for the page, located where I said.

it is set to yes and says "yes enable mop vars in all redirection, yada yada

OK, that’s what we want. Now make sure you are not logged in as admin and login as an s2member level 1 (or similar) and see what’s in the URL bar, i.e. something beginning with https (or maybe http) and paste that here.

here it is:
https://emaillistservices.com/members/freshleads/?_s2member_vars=sys..level..0..page..114..L21lbWJlcnMvbXktYWNjb3VudC8%3D&_s2member_sig=1456865510-d91b23afc94ed530938ea96026c1e793

What that’s saying is that you tried to access page 114 at level 0. So at what level is the LWP protected?

login welcome has no level since S2 does not let you change that. i have open registration set also

Of course not! I was thinking of something else.

Unfortunately, you have probably got a plugin (or, possibly, theme) conflict here. Normally, I’d say deactivate all the other plugins and see if it works then. But obviously this has to be a live site, so you probably don’t want to do that.

Do you have any caching or security plugins running?