We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40633
    • 4 Posts
    Here's the problem:

    When I install ModX (Revolution, 2.2.4), using Simple Scripts, to the root folder of any domain or subdomain, the manager login page is missing all styling: no pictures, and the forms and texts are all over on the left side of the page. I try to log in, and the page just refreshes. No complaints, just refreshes. BUT: install it to a subfolder of a domain--even if that subfolder happens to be the same one that another domain is mapped to--and everything's fine.

    Things I've tried to fix it:


    • clearing out the .htaccess file and all files in the folder
    • clearing out all .htaccess files in higher folders
    • re-assigning the domain/subdomain
    • putting this in the root .htaccess file of the domain/subdomain: "php_value session.auto_start 0"
    • copying the ht.access file into the .htaccess file
    • checked the ModX, Apache and PHP error logs--all of them are completely clean
    • checked the file permissions--folders are 755, files are 644, as they are in the working installations
    • checked the paths in the config file at core/config/config.inc.php
    • checked the default ModX workspace path in the modx_workspaces table (it's "{core_path}"--I assume it takes the value for that from the config file?)
    • set compress_js and compress_css values from 1 to 0 in the database
    • checked to make sure the admin user does actually exist in the database

    Things I haven't tried to fix it:


    • Installing ModX manually tongue (I'll get to that!)

    I actually do tech support for my webhosting company, so I've been consulting with my coworkers about it, and will report the problem once I find the cause/fix if it turns out to be a problem that needs to be fixed serverside or with Simple Scripts. (After all, a Simple Scripts install is supposed to work out of the box...) If you guys have some clues for me, that'd be awesome!
      • 3749
      • 24,544 Posts
      The fact that the Mgr Login page is missing CSS suggests a path issue (as you've probably guessed).

      Here are some more things to try:

      Double-check the URL paths and the processor path in core/config/config.inc.php.

      Do a "View Source" on the Manager Login page and see where it's looking for the CSS file, especially this one:

      <link rel="stylesheet" type="text/css" href="manager/templates/default/css/login.css" />


      (note that fixing the CSS path itself probably won't solve the problem, but that path may give a clue about what's wrong)


      Check the path in the config.core.php files:

      § MODX root directory
      § /manager/
      § /connectors/
      § /setup/includes/


      Check the MODX error log at: core/cache/logs/error.log


      ------------------------------------------------------------------------------------------
      PLEASE, PLEASE specify the version of MODX you are using.
      MODX info for everyone: http://bobsguides.com/modx.html
        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
        • 40633
        • 4 Posts
        You know, your suggestion made me think of something--I took a look at the page loading using Firebug (an excellent tool btw, which in this case shows piece-by-piece information about how the page acts as it is loading), and compared it to a working installation of ModX. Here's what I got:

        Working (subdirectory) install: http://173.254.0.38/screenshot//ss072912142710.jpg

        Nonworking (root) install: http://173.254.0.38/screenshot//ss072912142730.jpg

        Here's the URL it's showing for the first CSS file (all the others are similar): http://173.254.0.38/screenshot//ss072912142949.jpg

        So there we go! The directory path is correct, the files are all present in the places they should be (I checked, same relative path in both installs, all present and accounted for), but the URL is not including the domain name for some weird reason. (This can also be seen by the domain column showing up as "manager" or "connectors" instead of "relevanttomyinterests.net" on those pieces of the page which fail to load. Ah, Firebug!) No doubt this causes all sorts of issues beyond being unable to log in.

        I also checked the bit in the page source that you mentioned, here it is:

        <link rel="stylesheet" type="text/css" href="//manager/templates/default/css/login.css" />

        That double-slash there is suspicious--it isn't present on the working install. That being the case, I took a closer look at the config.inc.php file, and found this:

        $modx_base_url= '//';

        I'm guessing that's the source of the issue, or close to it. However, simply changing that to '/' doesn't fix the site. Where do you suggest I go from here?
          • 3749
          • 24,544 Posts
          After changing it, delete all files in the core/cache directory and clear your browser cache and cookies.


          ------------------------------------------------------------------------------------------
          PLEASE, PLEASE specify the version of MODX you are using.
          MODX info for everyone: http://bobsguides.com/modx.html
            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
            • 40633
            • 4 Posts
            Whoops, spoke too soon! I took out all the double slashes I could find, which were on lines 35, 41, 47 and 79 of the config.inc.php file (connectors, manager, base and assets), and voila! The site's up.

            So the problem, it seems, is that SimpleScripts is writing the base URL on root installations as '//' instead of '/', and all sorts of havoc ensues. Time for me to scurry off to find out whether this is happening on anyone else's account, or if I'm just special. wink Thanks for your help!
              • 3749
              • 24,544 Posts
              Is magic_quotes_gpc turned on by any chance? If so, that might be the cause of the trouble.


              ------------------------------------------------------------------------------------------
              PLEASE, PLEASE specify the version of MODX you are using.
              MODX info for everyone: http://bobsguides.com/modx.html
                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
                • 40633
                • 4 Posts
                No--I installed to three different accounts, two had magic_quotes_gpc turned off and one turned on. There seems to be no correlation, and near as I can tell it's a bug in the Simple Scripts installation itself. I'm documenting and reporting the bug to the developers now, which should hopefully lead to it being fixed quickly! Any clues or suggestions you may have are thoroughly appreciated.

                Quick question, while I'm submitting bugs and requesting features: Is the base install of ModX supposed to come with a demo site set up, or is it standard for the main site to be a blank white page until you put in a template? Because the blank white page seems to be standard for all ModX Simple Scripts installs, both working and non.
                  • 3749
                  • 24,544 Posts
                  I haven't done a fresh install for some time. For a long time Revolution came with no resources, plugins, snippets, TVs or chunks, but with a minimal base Template. I thought that a single Home page was added recently, but I could be wrong.

                  If you look in the DB at the modx_site_content table, you can see if there's a resource there and whether it's published or not.

                  If the paths are messed up, it won't show in the front end, though.


                  ------------------------------------------------------------------------------------------
                  PLEASE, PLEASE specify the version of MODX you are using.
                  MODX info for everyone: http://bobsguides.com/modx.html
                    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
                    • 41388
                    • 6 Posts
                    Hi,

                    I have the same problem.
                    My login screen misses the CSS and when I login with the correct login information, he only refreshes.
                    This is when I login at: m.gadjahmas.nl/manager (subdomain)

                    When I login at http://www.gadjahmas.nl/m/ (after a few page refreshes) the CSS is shown, and I can login.

                    In my case, I moved the website from a subdirectory to a subdomein: a mobile subdomain.
                    Actually I don't know how I have to change the config.inc.

                    I hope someone can help me.

                    First the url of my website was: http://www.gadjahmas.nl/m
                    That was the subdirectory.

                    Afterwards I changed it to: m.gadjahmas.nl

                    Down below you can see the settings of config.inc

                    if (!defined('MODX_CORE_PATH')) {
                        $modx_core_path= 'E:/gadjahmas.nl/wwwroot/m/core/';
                        define('MODX_CORE_PATH', $modx_core_path);
                    }
                    if (!defined('MODX_PROCESSORS_PATH')) {
                        $modx_processors_path= 'E:/gadjahmas.nl/wwwroot/m/core/model/modx/processors/';
                        define('MODX_PROCESSORS_PATH', $modx_processors_path);
                    }
                    if (!defined('MODX_CONNECTORS_PATH')) {
                        $modx_connectors_path= 'E:/gadjahmas.nl/wwwroot/m/connectors/';
                        $modx_connectors_url= '/m/connectors/';
                        define('MODX_CONNECTORS_PATH', $modx_connectors_path);
                        define('MODX_CONNECTORS_URL', $modx_connectors_url);
                    }
                    if (!defined('MODX_MANAGER_PATH')) {
                        $modx_manager_path= 'E:/gadjahmas.nl/wwwroot/m/manager/';
                        $modx_manager_url= '/m/manager/';
                        define('MODX_MANAGER_PATH', $modx_manager_path);
                        define('MODX_MANAGER_URL', $modx_manager_url);
                    }
                    if (!defined('MODX_BASE_PATH')) {
                        $modx_base_path= 'E:/gadjahmas.nl/wwwroot/m/';
                        $modx_base_url= '/m/';
                        define('MODX_BASE_PATH', $modx_base_path);
                        define('MODX_BASE_URL', $modx_base_url);
                    }


                    When I check the error log, I see this:
                    [2012-12-12 12:15:53] (ERROR @ /index.php) Could not prepare context: m

                    Pretty sure it has something to do with the path settings.

                    Can please somebody help me?

                    Greets, Mark
                      • 3749
                      • 24,544 Posts
                      Did you run Setup? That will often straighten out the paths.
                        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