We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36909
    • 15 Posts
    I've been happily using MODX for a while now, but this is my first post, so please be gentle! Let me know if you need more information.

    The site in question was developed on a pre-2.1.1 (traditional) version, but went live on 2.1.1 and has been running on that version for a while with no issues. When the client reported a bug that had been fixed in a post-2.1.1 version, I set out to upgrade. This is not my first MODX upgrade and I'd never had trouble in the past. I first upgraded the test site, which lives on a completely separate shared hosting environment than the live site. The upgrade went smoothly.

    The problems started when I tried to upgrade the live site. I am unfamiliar with the shared hosting provider, so I discovered that the host's file manager simply won't allow you to overwrite files by moving or copying files over them (which is how I'd upgraded the test site). That meant that I got to upload and overwrite via FTP (ugh). When I was done, I ran setup and the upgrade succeeded. The front end of the site looked and ran fine and I logged into the manager without issue. The manager itself, however, was borked. The Javascript was old, not present, or something of the sort because the resource/elements/files tree didn't load at all, the home screen was just a list of news updates (not in boxes as usual), and some menu elements wouldn't do anything when clicked. I tried a Ctrl+F5 refresh of the manager (since that forces a redownload of all page files, including Javascript). I cleared the core/cache folder. I tried from browsers that had never logged into the manager before. Nothing seemed to fix it. Since then, I have been going around in circles deleting the core, connectors, and manager folders, extracting out the folders from the redownloaded 2.1.3 zip, and reupgrading the site. Things have only been getting worse. Now I get 404 errors when I try to access the manager or setup folders, but the rest of the site runs fine (I'm directed to the 404 page I've set up in MODX, so something is working). The htaccess file has remained unchanged throughout, but if I remove it altogether, the 404 turns into a 500. All the usual directories that need to be writable are writable (in fact, I went for overkill and set everything in manager and connectors to 777). And the test site hums away, taunting me...

    I am at a loss for what to do now. I think something has been corrupted somewhere, and yet no matter how many times I redownload, reupload, and reunpack 2.1.3, nothing seems to get better.

    Any ideas? Anything else to try? Any additional information needed?
      • 22303 MODX Staff
      • 10,725 Posts
      If you are getting a 500 error when removing .htaccess, check the server (PHP) error logs if you have access to them; there may be some valuable information in there.
        • 3749
        • 24,544 Posts
        I'm not sure this would work in your environment, but on shared servers I use, I use this process:


        • extract everything in the MODX .zip file to a directory on your local machine
        • go to the MODX root directory of the extracted files (you should see assets, core, setup, etc.)
        • create a new .zip file containing everything there
        • in cPanel at the new site, go to the root directory
        • upload the .zip file
        • extract all files to the MODX root

        That overwrites any existing files when I do it.
          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
          • 36909
          • 15 Posts
          Thanks for your responses.

          Opengeek - I don't seem to have access to PHP's error logs, but I've opened a ticket with the host to see if I can get access or if they can provide me with logs somehow.

          BobRay - It took me a few readings to catch on, but removing the modx-2.1.3-pl directory from the zip is a really good idea. I tried it, and that did solve my problem of being able to easily do an upgrade on this host (thank you!), but I still have 500 errors, disguised as 404s. sad [ed. note: kmc4637 last edited this post 15 years ago.]
            • 3749
            • 24,544 Posts
            When you renamed .htaccess, did you also turn off FURLs in the Manager? If not, you can try doing it manually with PhpMyAdmin in the modx_system_settings table (find the friendly_urls setting and change the value from 1 to 0).
              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
              • 36909
              • 15 Posts
              I was able to get access to the PHP logs and it was full of errors thrown since this nonsense started. They were all the same message, and here it is:

              setup/index.php 
              suexec policy violation: see suexec log for more details 

              With a quick google search, I happened across this thread in which BobRay said that suexec can sometimes require specific file permissions: 644 for files and 755 for folders. Deciding I had nothing to lose in trying it, I applied the specific file permissions, then went back to setup to attempt an install update. I got some ugly "FATAL ERROR: MODX Setup cannot continue." messages. Despairing, I tried the manager. Flawless. It was completely fixed. Problem solved. Everything was working perfectly. The client has since checked it and she says it's working great for her too.

              Wow.

              So my thinking is that the files in the 2.1.3 zip were not the same as previous versions' zip files (or else all this nonsense would have started long before this past weekend), hence causing the problem.

              Thank you so much for your suggestions and brainstorming.

              The weird part is that I got a call from a different client earlier today, reporting the exact same 500 errors and issues after upgrading to 2.1.3. I haven't yet looked at their site, but the saga may continue...