On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS
  • Hello folks,

    After banging my head against a wall for several hours, I thought I would post here and see if I could get some help.

    I'm running Revo 2.5.5 (now 2.5.6) on shared hosting. Since yesterday, when I log into the manager, the left-hand tree is gone, the dashboard title says "undefined", and choosing any menu item results in a blank page. The only thing I can do is log out. Another twist is that I can only log in from Chrome on my main computer. When I try other devices and browsers, I can't even log in because the login page just redirects to itself.

    I've emptied /core/cache/ umpteen times. I've cleared out the cache in Chrome. I've tried disabling .htaccess. I've set compress_js and compress_css to 0. I've reinstalled MODX and even upgraded to 2.5.6. Same result, no matter what I do.

    It occurred to me that the problem could have to do with mod_security. My webhost informed me that they do have mod_security installed, and there is no way to disable it. The only error I'm seeing is this one:
    [Tue Apr 18 16:00:01 2017] [error] [client 65.75.128.175] client denied by server configuration: /home/truthfor/public_html/core/docs/changelog.txt

    This error is triggered when I log in or log out of the manager. Does this error have anything to do with mod_security?
    I know from what I read that it is preferable to host MODX on a host that doesn't have mod_security, but I hope I don't have to move to another host. That would be a big hairy deal.

    The weird thing is that this just happened all of a sudden. I'm fairly certain that I didn't do anything to cause the manager to break like this. The only thing I've been tweaking lately is adding SSL to my site, and I did install the RevoSSL plugin not long ago. Could that be a possible source of the problem?

    Please let me know if you have any thoughts or things I can try before I pull all my hair out. Thanks!

    This question has been answered by Beniamin. See the first response.

    • It looks like there was a bug in an older version of revoSSL which may be relevant.

      https://github.com/jgulledge19/RevoSSL/issues/1
        If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

        email: andy@andytough.com | website: https://andytough.com
      • I had installed the latest version. Also, I've already gone into phpMyAdmin and disabled that plugin. That should take it out of the equation, right?
        • Yes, that should do it.

          Just to clarify - the site did work OK previously on this host?

          Have you changed the directory that the site is in?

          When you disabled the .htaccess file did you disable both the one at the root level of the site and the one in the 'manager' folder?

          Are the permissions for all files and folders correct?
            If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

            email: andy@andytough.com | website: https://andytough.com
          • Yes, this site has been on this same host for over a year before this happened. I haven't changed the directory.

            I only disabled the root level .htaccess file, but when I checked the one inside the manager folder just now, it wasn't enabled anyway. I tried enabling it, but that didn't do anything.

            Just now I set all the files to 644 and all the directories to 755. Still no improvements.
            • I wonder if the error
              [Tue Apr 18 16:00:01 2017] [error] [client 65.75.128.175] client denied by server configuration: /home/truthfor/public_html/core/docs/changelog.txt
              is caused by the .htaccess file in your /home/truthfor/public_html/core/ folder

              When emptying the cache I presume you have been doing it via FTP or SSH?

              It might be worth asking Bob Ray if his site check tool could help diagnose the problem. I believe that it can be run outside of MODX if the installation is not working correctly.

              https://bobsguides.com/sitecheck-tutorial.html
                If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

                email: andy@andytough.com | website: https://andytough.com
              • A few things to try.

                Visit with the browser in incognito or private mode in case it's a cookie problem (leftover cookies can mess up the Manager after an upgrade).

                Edit this file: /home/truthfor/public_html/core/docs/changelog.txt and remove its content (back it up first). If that fixes things, it means that there's something in there that mod_security doesn't like.

                I looked at the code of RevoSSL, and it doesn't appear to change any MODX settings or mess with .htaccess, so disabling the plugin should take it out of the picture as long as you manually delete all files in the core/cache directory after disabling it.

                BTW, a good host will usually disable mod_security for the Manager folder if asked (or even for the whole site). They should also be able to look at their logs and tell you what rules are being violated.

                You should also take a look at the three config.core.php files (root, manager, and connectors directories), and at core/config/config.inc.php. Make sure all the paths and URLs are correct. Sometimes the paths in there contain server-specific stuff and it's possible that your host moved your site to a different server.

                  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
                • discuss.answer
                  Good news: The problem is solved! It was a matter of a lot of narrowing down and playing with database backups.

                  First of all, I remembered that I had another Revo installation on this same shared server. I don't know why it didn't occur to me to login there earlier, but I logged into that manager, and there were no issues there. So that led me to believe that it wasn't the host's fault, but something on my end, either in my database or files.

                  The next step was to figure out whether it was something in my database that was causing the problem, or something in the file system. I asked my web host to restore the database from a backup of when it was working fine. They did that, and the manager worked. So that told me the problem was in the database somewhere.

                  I used DiffMerge to look at dumps of both versions of the databases, but there was too much there to figure out. So I decided to try individual tables. I replaced the modx_system_settings table in the working version with that from the non-working version, and that broke the manager! So then I knew the problem was in that table, and I did a DiffMerge on that.

                  Turns out that last week when I was fiddling around with URLs in MODX, I had created a system setting for base_url. I don't think it accomplished anything, but I just left it there for some reason. When I removed that setting, voila, the manager is cured.

                  I guess the moral of the story is backup your database before you start tweaking random settings (I got lucky this time since the webhost had a backup!), and keep track of what you change, so you know what you might have done that would cause a problem. And remember that user error is always a possibility tongue

                  Thanks for your help guys. By the way, Bob, although it didn't identify the problem, I did purchase SiteCheck and ran it on this site. I think will be a good investment since I work with several MODX sites. It also found some issues with this one that I wasn't aware of.
                  • I'm glad you got it sorted. Thanks for buying SiteCheck. smiley
                      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