Simple Membership Plugin › Forums › Simple Membership Plugin › Logout Link Not working
Tagged: cookies, Logout, simple membership
- This topic has 26 replies, 4 voices, and was last updated 8 years, 3 months ago by
The Assurer.
-
AuthorPosts
-
February 8, 2018 at 7:17 pm #13286
The Assurer
ModeratorSee if Varnish has a way to not serve cached pages, when the swpm_in_use cookie is in use.
February 8, 2018 at 7:20 pm #13287gphsupport
ParticipantGood idea. I know Varnish does, but I don’t think my host will do special rules for the Varnish setup. I am going to have them try and disable Varnish just to test. If it works after that, at least I know that is what the issue was. But if they disable Varnish and it still doesn’t work, I’ll be back to square one.
February 8, 2018 at 9:02 pm #13288gphsupport
ParticipantOk, so, it looks like is browser cache and not varnish cache that appears to be doing it (???). So, I manually added:
<FilesMatch “\.(css|flv|gif|htm|html|ico|jpe|jpeg|jpg|js|png|pdf|swf|txt)$”>
<IfModule mod_expires.c>
ExpiresActive Off
</IfModule>
<IfModule mod_headers.c>
FileETag None
Header unset ETag
Header unset Pragma
Header unset Cache-Control
Header unset Last-Modified
Header set Pragma “no-cache”
Header set Cache-Control “max-age=0, no-cache, no-store, must-revalidate”
Header set Expires “Mon, 10 Apr 1972 00:00:00 GMT”
</IfModule>
</FilesMatch>To my htaccess and now it appears to logout out just fine. So, something in the browser cache is not clearing out the cookies properly when it tries to do the whole logout sequence. Hopefully this helps someone else in the future!
The Assurer, if you could take one final look (clear your temp files) and try again and let me know if it works on your end as well, I’d appreciate it.
February 8, 2018 at 9:06 pm #13289gphsupport
ParticipantIt appeared not to be working, so I went back to this:
<IfModule mod_headers.c>
Header set Cache-Control “no-cache, no-store, must-revalidate”
Header set Pragma “no-cache”
Header set Expires 0
</IfModule>February 8, 2018 at 9:50 pm #13291gphsupport
ParticipantThat and manually starting php sessions seems to have done the trick!
February 8, 2018 at 9:52 pm #13292The Assurer
ModeratorAs of this moment, I am able to login / logout to my heart’s content without any issues.
Ok, so, it looks like is browser cache and not varnish cache that appears to be doing it (???).
I never use local (browser) caching. I got Chrome setup to force a new page load on each page visit. Were you using the mod_headers module on your other site?
February 8, 2018 at 10:21 pm #13295gphsupport
ParticipantWonderful. Thank you for confirming. I will go ahead and delete all the test information now!
I had disabled most of the caching on the other site, because of (duh) site functionality issues. It is, however, something one often might do for site speed/SEO reasons.
So, good lesson here. Thank you for your help!
February 9, 2018 at 7:02 pm #13301John SF
ParticipantI’m not using any caching or Varnish, but WordPress is in a subdirectory.
My client wants to keep it that way.
Is there anything I can do to get the logout to work properly?February 9, 2018 at 9:27 pm #13307The Assurer
Moderator@JohnSF — Please provide us with a URL and test account credentials.
February 9, 2018 at 9:41 pm #13308John SF
Participanthttp://www.capstoneart.com/wordpress/membership-join/
go ahead and Register to become a member, and I’ll bless your account.February 9, 2018 at 10:36 pm #13313The Assurer
ModeratorBless me Father, for I have registered.
February 10, 2018 at 1:04 am #13317The Assurer
Moderator@JohnSF — I just did 5 sequential login / logouts from your site:
* Login / Logout = Successful
* Login / Logout = Successful
* Login / Logout = Successful
* Login / Logout = Successful
* Login / Logout = SuccessfulThe criteria for a successful logout was the absence of the “LOGOUT” link, in the menu bar; after it had been clicked.
-
AuthorPosts
- You must be logged in to reply to this topic.