We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 52425
    • 3 Posts
    Hi all, I'm new to MODX and have just moved a site for a client (which we didn't build). Everything is working fine, except I can't login to the manager.

    When I enter the login the previous company have given me, it just refreshes and takes me to a non http version of the page (which does the same if I try and login).

    Clearing the cache has no effect and I've checked the error log but there is nothing new in there.

    I'm not sure what to try next, I've checked all my configs and all the settings and paths are correct...

    Thanks in advance smiley
      • 3749
      • 24,544 Posts
      That usually indicates a problem with sessions. If you have a plugin, for example, that switches the user from http to https (or vice versa), that would result in a loss of session data since they're now in a new domain, unless the plugin handles this. The user's credentials are stored in a $_SESSION variable and MODX checks them against the DB. If they're not there, you'll get sent back to the login page.

      I'm not sure if an .htaccess rewrite could also cause that problem or not. You might check to see if you have such a rewrite rule in .htaccess.
        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
        • 52425
        • 3 Posts
        Hi BobRay, thanks for the reply. I've run it with my developer tools open and localStorage and sessionStorage both remain empty. I've checked the .htaccess file and it only has these rewrites in it, above the friendly URL part (which contains no hard-coded URLs).

        My /manager/ folder had a .htaccess file with "RewriteEngine Off" in it.

        #RewriteCond %{HTTP_HOST} .
        #RewriteCond %{HTTP_HOST} !^www\.webaddress.\.co.uk [NC]
        #RewriteRule (.*) https://www.webaddress..co.uk/$1 [R=301,L]

        # Rewrite secure requests properly to prevent SSL cert warnings

        #RewriteCond %{SERVER_PORT} !^443
        #RewriteRule (.*) https://www.webaddress.co.uk/$1 [R=301,L]

        I'm really not sure what to try next?

        Thanks!!
          • 3749
          • 24,544 Posts
          There must have something installed somewhere that switches the user to https, or it wouldn't happen. Do you know what it is?

          It might also be an issue with your session_save_path.
            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
            • 52425
            • 3 Posts
            Hi all, I'm still looking for some help with this. I've tried a few things but still can't login to the management area.

            The client apparently managed to randomly login one say last week but hasn't been able to since.

            We are replacing the site with a new one but in the meantime the client really needs access to the management area. Would anyone be willing to take a look? Happy to pay but struggling to find a MODX specialist that will charge by the hour rather than by the day!

            Thanks!!
              • 47401
              • 295 Posts
              Check that Global php tags is off, rename the .htaccess file to ht.access in the root. also do the same to the htaccess file in the managers folder. Clear the cache folder manually and remove all contents, delete your cache on your local machine. if that fails, I would copy across the original setup folder from the same version of modx that you have installed and re run setup and select upgrade option. This will change modx variables back to the default.

              before doing this make sure you backup the database first smiley