Just migrated to new host and now

I have got just about all things working on new host BUT, when signed in as an Admin, cannot go to any page with ccaps set… it redirects me to our Pay page…

What/where can I check to rectify this? what are the custom things that don’t get transferred over in a migration to a new host (or wordpress update? although am still on WordPress 4.9.16)?

Thanks

Hi Dylan.

Maybe the browser is not considering you logged in when you visit the page? Are you being consistent with the use of www? https://s2member.com/kb-article/how-to-avoid-login-issues/

See that helps. Let me know. :slight_smile:

oh wow, that is tricky - how daft… I did add define(‘COOKIEPATH’, ‘/’); but it made no difference… also changed the //define(‘WP_HOME’, and //define('WP_SITEURL to https as they were just http but no difference…

I tried with a test user account, level 1, with all ccaps added, but getting redirected to Buy page on all with ccaps AND sometimes ones requiring Level 0, but not always - weird…

What’s the next thing to try?

I have in the meantime read more topics on here and contacted host to confirm that server side caching is disabled and my website uses NO cache plugin at all…

Still cannot access ccaps pages by Admin or Level 1 user with ccaps added…

Thanks for the update.

Hmm… From the behavior, it still feels like a login session to me…

Could you private message me a login I could use to take a look at your setup and try a couple things to see the behavior myself?

yes sure, I think I have just sent you a message just now…

Thanks

Thanks. Left you a question about the address.

Thanks for the link.

Okay, I found a page protected with a ccap: “Activated Food”, protected with ccap “wordissues”. I tried opening it in a private/incognito window and was sent to the Membership Options Page, but when I opened it as the admin, I could view it without a problem. I checked account profile to make sure it didn’t have the ccap, and it doesn’t. It’s just s2 not applying the restriction to an administrator.

I don’t know if you sorted out the problem since you sent me the details, or if your browser behaves different than mine regarding the session…

But I didn’t experience the problem on my end on your site. Let me know if I misunderstood the problem.

:slight_smile:

Okay - why the heck would Admin not be allowed to see ALL pages? anyhow…

Please try with this user
[removed details]

this user has Level 1 and all ccaps enabled. When I go to Writing - General Module and the click Page 1 in the left hand menu, it opens fine (it’s protected only as Level 1), then click on Page 2 and it goes to Membership sign up (those pages with star are only Level 1 protected i.e. free to anyone registered)? which is so strange as Page 1 and 2 have same protection!, OR if I click on Page 3 which is ccaps protected, still go to Membership options… not correct… I am doing this in an incognito window too on Chrome on Win 10…

Okay - why the heck would Admin not be allowed to see ALL pages? anyhow…

Admins aren’t stopped by s2 restrictions, but I tested with an admin account because that’s the account you sent me to test with, so I thought that’s what you said were having the trouble with. I could see the page that was protected, I didn’t have a problem. And I tested seeing a page that you had protected with a ccap, because I thought that’s what you said you had trouble with:

I removed the login details for the other account, because this is the public conversation. I will now test what you said in the last post.

Ok, I see what you meant.

When I clicked to any of the pages there, it sent me to the Membership Options Page, even when logged in as the admin.

As I was suspecting, it’s a login session problem because of the links. You’re using https on your site, but those links were pointing to http. When I changed the page2 link to https, I didn’t get redirected and was shown the page.

Please see this page I linked to earlier: https://s2member.com/kb-article/how-to-avoid-login-issues/

  • Important: … if a user logs into the site over https:// , where the form action is something like https://example.com/wp-login.php , there is a good chance they will not be thought of as logged-in on the http:// protocol. Their logged-in cookie is only good over SSL in this case.

Therefore, visiting http://example.com/ after logging in from https://example.com/ will lead to confusion. This is because WordPress sets the cookie in such a way that it is only accessible over SSL; i.e., on the original protocol they logged into the site with: https:// .

You just need to fix your links so they point to https.

:slight_smile:

Ah, a simple solution - thanks for spotting the http links! I have changed them to https with the Velvet Blue plugin. Thanks again for your help, cheers

1 Like

Great! Glad I could help. :slight_smile: