What i am trying to do : Well, i am trying to achieve multiple context login (in my case its multiple subdomains). I managed to do it using below 3 steps (this is for other users who are struggling to make it work like me)
1) Changed "session_cookie_domain" setting from blank to ".mydomain.com"
2) Added context names to login snippet
[[!Login? &context=`web,data,tech`]]
3) "Clear cache" from inside modx manager. And you are done.
After these 3 steps it worked on plain demo page but when i added login snippet code to my live home page it didnt worked, after troubleshooting i found that
<base href="https://www.mydomain.com/">
is causing the problem, i removed <base> tag to fix the problem. (Note: Font awesome throws CORS error if we use <base> tag, so i had to add some .htaccess rules to make them work together).
Problem : Login snippet works on all other pages except home page. Strange thing is that, i created duplicate of home page "www.mydomain.com/home-copy" and login works on this page, but doesnt work on "www.mydomain.com". Both pages have same template, use same login form chunk and snippet call.
Anyone faced same issue ? Any clue will be much appreciated as well.
This is my snippet call code
[[!Login? &loginTpl=`mlogintop_2017` &fbloginurl=`[[!sociallogin]]` &contexts=`web,main,tech,data`]]
[ed. note: amitpatil last edited this post 7 years ago.]