Hi all,
I'm having a strange issue with modx 2.1.2-pl + Login 1.7.0-pl.
I've got 3 contexts: web, en and area-riservata
I'm trying to set up a protected area in the context area-riservata.
The tree of the context is:
- 'Home', where I have the Login snippet
- 'Documents' (child of Home), where users are redirected when login is succesfull
Something strange happens: I can log in succesfully (I've done some debugging, stopping the flow and printing out user properties before the redirect happens); but as soon as I'm redirected to the protected page the current user is 'anonymous' again.
Has anyone experienced the same issue?
Thank you very much
Alessandro Chinazzo
[ed. note: kinazz last edited this post 14 years, 10 months ago.]
Did you specify the other context(s) in the login snippet tag?
&contexts=`web,en,area-riservata`
If the user is only logged into one context, he or she will not be logged in when visiting a page in another context.
FYI, the contexts property is listed as "experimental," so I'm not sure how well it works at this point.
Thanks a lot, it seems to work!
Good to know. Thanks for reporting back.
Hi,
I'm trying to set up the same thing on modx-2.2.0-pl2 with Login 1.8 and it's not working.
any hint?
thanks
Nothing comes to mind. AFAIK, Login 1.8 works with anything above MODX 2.1.0. If you're previewing from the Manager or another window in a browser where you're logged in to the Manager, you may see confusing results.
------------------------------------------------------------------------------------------
PLEASE, PLEASE specify the version of MODX you are using.
MODX info for everyone:
http://bobsguides.com/modx.html
I don't know if this will help but:
One issue that I was having and took me days to solve was to make sure there were no spaces in &contexts (i.e. use 'web,context1,context2'; not 'web, context1, context2'). This is a documented bug and is present in 1.8.0.
Hi all,
first of all, thanks for your suggestions.
I managed to fix it... the problem was related to the "session_cookie_path" system setting, which was empty (by default I guess).
Sessions were created only in web context until I put a value of '/' in session_cookie_path, which fixed it!