We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 53106
    • 3 Posts
    Hi there!

    I'm using latest Revo build(2.5.2) and there is a trouble with saving sessions in cookies. My site is multidomain. When I enter any domain except main, I have no PHPSESSIONID cookie, it only appears if i try to login to Control Panel using that domain. I found out that session writes to cookies only on /manager address, in any other cases there is no cookies at all. Do you have any ideas how to solve this issue?
      • 3749
      • 24,544 Posts
      First, make sure you've uncommented one of the sections that forces www or non-www URLs in .htaccess (but not both).

      Second, make sure you have this tag (with the exclamation point) in the head section of all templates:

      <base href=[[!++site_url]] />

      Third, make sure your login tag uses the &contexts property for any context the user might visit:

      &contexts=`web,context2,context3`
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 53106
        • 3 Posts
        My .httaccess forces user to use domain.com, not www.domain.com, is it okay? Or i have to change it to www.domain.com?

        I have my base_url included everywhere.

        And I have no login for users. I use anonymous sessions.

        If it helps, I use https on my site.
        [ed. note: larinel last edited this post 7 years, 3 months ago.]
          • 3749
          • 24,544 Posts
          I'm not sure I understand your problem, but sessions are domain-specific, so if a user comes in on one domain, it's normal that they wouldn't get a session cookie for another domain.

          See if anything here helps helps: http://stackoverflow.com/questions/3342140/cross-domain-cookies

            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 53106
            • 3 Posts
            I know that. But issue is that i have no cookies at all site(any domain). It means I have domain.com, domain.uk etc. But i have no cookies on them, but i need them because i have shop cart that depends on session. Although, if i enter manager, i receive session cookie from server.
            There is anonymous_session option enabled.
              • 3749
              • 24,544 Posts
              I'm afraid I'm stumped. The only thing I can think of is to look at the MODX session System Settings. Go to the System Settings section of the Manager and put session in the search box at the upper right.

                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting