We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 11243
    • 27 Posts
    Quote from: cyclissmo at Apr 18, 2011, 03:04 PM

    You should go into your browser and delete all cookies for your domain, if you haven’t already.

    Thanks for the suggestion, but a little bit of hunting round on the forums and I found this:
    http://rtfm.modx.com//display/revolution20/Troubleshooting+Installation%3bjsessionid=6572FF65E11ED2469B326349729EBEEE#TroubleshootingInstallation-Theloginpagekeepsredirectingmebacktotheloginscreenwithnoerror
    And it worked for me! smiley

    So I can log in to manager again, but still hasn’t fixed my original problem sad
      • 22303 MODX Staff
      • 10,725 Posts
      Did you set the session_cookie_domain value in each Context appropriately for each domain?
        • 11243
        • 27 Posts
        Yes I did, eg. for ctxt2 I added a context setting of .domain2.co.uk
          • 22303 MODX Staff
          • 10,725 Posts
          Did you flush the session table? If not, try truncating it now via phpmyadmin and if you have the session configuration correct, it should work.
            • 11243
            • 27 Posts
            Cache cleared, sessions flushed (and session table truncated) but still no joy sad

            Interestingly, after flushing the sessions I tried to access my test page and then did a single page refresh on both my default (web context) site and my other (domain2 context) site again with the same result ie. the pagelist session value incremented successfully on the web context but kept getting reset on the domain2 context. When I looked at the contents of the session table afterwards, there was just one entry for the web context (as you’d expect):

            [tt]modx.user..attributes|a:1:{s:3:"web";a:3:{s:16:"modAccessContext";a:1:{s:3:"web";a:1:{i:0;a:3:{s:9:"principal";i:0;s:9:"authority";s:1:"0";s:6:"policy";a:1:{s:4:"load";b:1;}}}}s:22:"modAccessResourceGroup";a:0:{}s:17:"modAccessCategory";a:0:{}}}webDocgroups|a:0:{}pageid|i:1;pagelist|a:2:{i:0;i:1;i:1;i:1;}[/tt]

            But there were 4 session records for the domain2 context, 2 records generated for each page access, the second of which has an empty data field with the same access time as the first? The first record for each access was like this for both:

            [tt]modx.user.contextTokens|a:0:{}
            pageid|i:140;pagelist|a:1:{i:0;i:140;}modx.user.contextTokens|a:0:{} [/tt]

            I’m thinking maybe I should hang on for version 2.1 and then try a fresh installation?
              • 22303 MODX Staff
              • 10,725 Posts
              Quote from: graviteski at Apr 20, 2011, 12:57 AM

              I’m thinking maybe I should hang on for version 2.1 and then try a fresh installation?
              I can’t reproduce this—are you sure you session configuration for the other contexts is correct? I’m not sure why you are experiencing this. Are you sure the HTTP_HOST is being reported correctly on the domain not represented by the web Context? What are your other session configuration settings (from MODX and/or php.ini)?
                • 11243
                • 27 Posts
                Well this is the first time I’ve tried using anything other than the web context, so it’s quite likely I have made a mistake!

                (I’m substituting my actual domain name with ’domain2’ and my actual context name with ’ctxt2’ here, but hopefully this will give you the info you need?)

                My context settings for ctxt2 are:

                [tt]Key Value
                session_name ctxt2
                base_url /
                site_start 109
                http_host beta.domain2.co.uk
                site_url http://beta.domain2.co.uk/
                session_cookie_domain .domain2.co.uk[/tt]

                For the moment I have been locked out of my manager login again though and the above fix hasn’t worked this time! >:( So I can’t try reporting the HTTP_HOST value when running in this context for now... will get back to you if I can get back in to try it!