We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16474
    • 5 Posts
    I’ve set up 3 contexts in my installation (web, and 2 other ones). Whenever I view the sites I have set up in the contexts other than web, I am logged out from the Manager. This doesn’t happen when I view the site in web.

    Does anyone have an idea as to what’s happening?

    EDIT: I fixed it by manually setting session_cookie_path in each context to the same folder. Can anyone confirm if this is good / safe to do?
      • 22303 MODX Staff
      • 10,725 Posts
      Quote from: Kuriko at Jan 21, 2010, 04:54 PM

      EDIT: I fixed it by manually setting session_cookie_path in each context to the same folder. Can anyone confirm if this is good / safe to do?
      Just depends on how you are using the Contexts and if you want a user to share a single session across all of them.
        • 3241
        • 8 Posts
        Hi

        I’m also having a problem with getting logged out when switching between contexts.

        How did you fix it? did you just add the session_cookie_path= ’/’ to each context as a context setting?

        Thanks
        Bevan
          • 22303 MODX Staff
          • 10,725 Posts
          You have to log users into each context specifically. Logging into the manager for instance, means you are authenticated only in the mgr context. The believe the Login snippet has a way to log users into multiple contexts at once if you need this feature. This is a separate, but related issue from sharing the session based on the domain and/or path being used to access the site. IOW you can’t log a user into multiple contexts if each one is on a separate domain name; the sessions are not, and cannot be the same.