Ultimate Member Logging in issues
-
When users try to logging in (even with the correct credentials) the website doesn’t recognize the user and the private pages show an error message. OR the user logs in and when switching pages ultimate member logs out!
Please help!
Thank you!
-
Hello @aelias7
Are you having issue only with Ultimate member login form or its the same case with default wordpress login page?
I am having a similar issue and it only happens on mobile browsers. No issue on desktop or if I change the mobile browser to use desktop site.
User logins in. When they click on a restricted page it gets a 404, and they are logged out. If I swap back to desktop mode, login again, then click on a restricted page it works
Login page is not cached
I can recreate on Chrome Devtools with Device Toolbar as well as on live mobile devices.
WordPress 6.9.1, Ultimate MemberVersion 2.11.2 , PHP version8.3.30
-
This reply was modified 3 months ago by
maryboki.
Hello @maryboki
The problem you described topically occurs if pages are cached. Maybe caching on your website is enabled for mobile but disabled for desktop.
You should know that caching is a good thing for static pages, but it’s a bad thing for dynamic pages. This is because caching bypasses the page rendering. In general, caching should not be applied to pages with variable content.
You should disable caching for these pages: Login, Register, Reset Password, Account, User. You also should disable caching for pages with restricted content.
A way to disable caching for certain pages depends on the caching plugin or the server caching tool you use. You can find instructions for popular caching plugins and tools in the article Caching problems.
Regards
Thank you for the feedback. I only use Cloudflare which caches based on URL but perhaps the issue is not caching my restricted pages. I will try that solution.
I setup cache rules on Cloudflare for all of the Ultimate Member Pages & Restricted Pages. The problem still occurs. When I use DevTools I don’t see any cache being used for those pages. The problem still occurs on mobile. Any other suggestions?
I believe the issue is cookie related.
I notice that there are 2 cookies added when I login as a user: wordpress_logged_in_xxxxxx and wordpress_sec_xxxxxx.
On Desktop when I select a restricted page those cookies are still present, but they are removed on Mobile.
Who creates these cookies and what causes them to be removed on Mobile?
I have narrowed down the problem. On mobile (not desktop) when clicking on a link to a Restricted page via the Menu the wordpress_logged_in_xxxxxx and wordpress_sec_xxxxxx session cookies are cleared.
The Menu is only shown to Logged In Users, and different links are shown based on the Member Type.
If I create a page that has the same links as the Menu I can click on the links and the problem doesn’t occur. The Session Cookies persists.
Hi @maryboki,
Сookies you mentioned belong to the group of cookies used to keep a user authorized (logged-in). You are a logged-out visitor if these cookies are cleared.
Can we view your website? You need to examine the headers returned along with the page content to determine whether it has been cached.
Regards
The issue is under the Nest Parent menu – I can give you a login. Email me at [email protected]
Looking at the network traffic it almost seems that when the Nest Parent menu is displayed there is a link pre-fetch for all the menu items, and when it gets to Logout menu item it logs the user out.
See https://photos.app.goo.gl/mutrkB2CXDbwaioBA
I host on BlueHost – perhaps this is the issue?!
-
This reply was modified 2 months, 3 weeks ago by
maryboki.
Disabling the BlueHost plugin has solved the problem. Thank you for your help. I will open a case with BlueHost.
To close the loop – there is a setting in the BlueHost plugin
Link Prefetch: Asks the browser to download and cache links on the page ahead of them being clicked on, so that when they are clicked they load almost instantly. Setting is available for desktop and mobile.
I disabled on both mobile and desktop.
Hello @maryboki
Thank you for letting me know. I’ll mark this thread Resolved.
We’ve warned about the caching issue numerous times on this forum. It’s also documented here. Caching and privacy are fundamentally poorly compatible. Please follow these rules:
1) Don’t cache pages used for authorization.
2) Don’t cache pages with private content.
3) Don’t cache pages with restricted content.Regards
-
This reply was modified 3 months ago by
You must be logged in to reply to this topic.