- MODx 2.0.8 traditional and Login 1.5.2
- Document with a uncached Login snippet call on a custom context (subdomain as a domain alias)
- Uncached Personalize call with placeholder [[+username]]
- A Resource Group with a few assigned documents
- User Group for members that has "Load only" policy to all context (except mgr)
- Resource Group Access to my Resource Groups (also on all context)
Now if I try to login on the custom context it just redirects to the login page. Also Personalize doesn’t set [[+username]]. Even though the number of logins of this user raises every time.
No difference of with and without the experimental feature contexts=`myCustomContext`
However when I move all documents to the ’web’ context it just works™! So I initially thought it might be a bug, but on IRC splittingred pointed out that the issue is due to my subdomain, which suddenly made sense. That I should try to set session_cookie_domain to `.mydomain.com`
http://rtfm.modx.com/display/revolution20/session_cookie_domain
Note: Testing session_cookie_domain is like playing with the fire
Only set this if you are sure of what you are doing.
So after changing session_cookie_domain to `.mydomain.com` I couldn’t login into the manager on mydomain.com/manager anymore. Luckily www.mydomain.com/manager still worked. After some more unsuccessful test of my login call I decided to go back to default `localhost` (according to the docs). Now I couldn’t login to mgr anyomre at all! So in case you screw up like me, just go phpmyadmin
change session_cookie_domain system setting to empty text then clear core/cache/ .
I’ll run all login on default web context for now.