Simple Membership Plugin › Forums › Simple Membership Plugin › Logout link not working
Tagged: logout link
- This topic has 7 replies, 2 voices, and was last updated 3 years, 1 month ago by
Serge.
-
AuthorPosts
-
April 20, 2023 at 9:05 pm #25983
Serge
ParticipantHi there,
I have a strange issue. The logout link refuses to logout. We have to close the browser to be logged out. Any idea about what is wrong?
The link is simply like this: https://domain.com/?swpm-logout=truethanks,
SergeApril 20, 2023 at 9:52 pm #25985mbrsolution
ModeratorHi, do you see any error messages when you click on the logout link? Do you have a cache plugin running in your site by any chance?
Kind regards.
April 20, 2023 at 11:21 pm #25986Serge
ParticipantHi mbr,
no error is displayed. It just goes back or stays in the login page. I see a console error but may not be the cause:
JQMIGRATE: Migrate is installed, version 3.4.0
(index):236 Uncaught TypeError: Cannot set properties of null (setting ‘oninput’)
at (index):236:83
(anonymous) @ (index):236
content.bundle.js:1 observingNo cache plugin but have cache in htaccess because the website was causing errors at the server:
ExpiresByType application/x-javascript “access 1 month”
ExpiresByType application/javascript “access 1 month”thanks,
SergeApril 21, 2023 at 1:15 am #25996mbrsolution
ModeratorHi, please carry out the following troubleshooting steps.
Let me know how you go.
Thank you.
April 21, 2023 at 2:33 am #25997Serge
ParticipantDeactivating plugins did not make any change. I did not deactivate woocommerce because it was there early and the issue is relatively recent. Is there a trace or a way to find out what is the issue? Is there another way more sure to log out by link?
What is the file that does the log out? I would have a look.thanks,
SergeApril 21, 2023 at 3:35 am #25998Serge
ParticipantHi MBR,
I found the issue. Your initial clue helped me. It was the expire from htaccess. I removed the following and it started working well again:
ExpiresActive On
ExpiresByType image/jpg “access 1 year”
ExpiresByType image/jpeg “access 1 year”
ExpiresByType image/gif “access 1 year”
ExpiresByType image/png “access 1 year”
ExpiresByType text/css “access 1 month”
ExpiresByType application/pdf “access 1 month”
ExpiresByType application/x-javascript “access 1 month”
ExpiresByType application/javascript “access 1 month”
ExpiresByType application/x-shockwave-flash “access 1 month”
ExpiresByType image/x-icon “access 1 year”
ExpiresDefault “access 2 days”Maybe you can point me to which of these line I could keep to save on bandwidth.
thanks,
SergeApril 26, 2023 at 9:49 pm #26011mbrsolution
ModeratorHi @Serge, sorry for the late reply. It would be a bit challenging to workout which part of the code is causing the issue. However the following line ExpiresDefault “access 2 days” catches my attention more than the other lines. But I am not sure if this is the only part of the code that will cause this issue.
Kind regards.
April 26, 2023 at 11:57 pm #26014Serge
ParticipantHi Mbr,
I think I’ll leave the whole code out. Caching pages are causing other issues. I’ll update this post if I do something.thanks,
Serge -
AuthorPosts
- You must be logged in to reply to this topic.