We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40186
    • 28 Posts
    I'm... I'm baffled.

    I had a site in ModX Revolution (http://www.hellbendermedia.com/). It seemed to be working hunky dory for several months.

    This morning, I notice I can't get into the manager: "Fatal error: Call to a member function get() on a non-object" on line 41.

    Checked my paths and they seemed to be what I expected them to be.

    The site itself loaded, and seemed to function based on a quick browse, but the Gallery images weren't showing up.

    Following a suggestion on one of the threads, I cleared my browser cache, and then deleted all the site cache files (core/cache).

    Then I tried to run a setup again.

    Had to download the new version. Looks like there was a slight revision up. Current revision is 2.2.5-pl. I don't know what my previous version was -- How can I determine that?

    So, upgrade downloaded, files transferred to server. CONNECTORS CORE and MANAGER directories were told "only replace a file if I'm replacing it with a newer file".

    So, opened the setup folder in a browser: http://www.hellbendermedia.com/setup/

    Said I wanted to Upgrade an Existing Install.

    Unable to check the "Core Package has been manually installed" checkbox, but check the "Files are already in-place" checkbox. Click [Next]

    Site immediately jumps to a generic "500 Error -- Site temporarily Unavailable"

    WTF?!

    So, I go back to http://www.hellbendermedia.com/setup/

    This time, I tell it I want to do an Advanced Upgrade Install. I click [Next].

    I copy my DB information directly from my phpmyadmin interface. The DB user has all necessary permissions.

    I click "Test database server connection and view collations."

    Nothing happens. No "Hurray it works!" message. No "Failure to connect" message. Nothing happens. (I try as an experiment putting in a bogus login name and it throws a proper "cannot connect to the database" error.)

    Site is still error 500. I cannot figure out why. I cannot seem to upgrade. I'm just completely dead in the water and baffled.

    Directory permissions appear to be 755 and file permissions appear to be 644, but i don't know how to check everything.

    I appear to have no PHP header in my .htaccess file.

    I'm open to ideas or suggestions. Checked around the board and didn't find anything that seemed to offer new info. Baffled and trying to not get too freakoutty about it.

    Advice? Suggestions?
      • 40186
      • 28 Posts
      Next steps: Deleted the SETUP, CONNECTORS, CORE, and MANAGER folders from the site and copied back the previous ones. brought back the previously-backed-up database.

      Current status: I can see the home page, but nothing underneath it works. No other pages.

      Better than a 500 error, but still pretty kronked.

      Suggestions? Ideas?
      • Did you FTP the files onto the server? FTP can corrupt or miss files. Also, there's no reason not to just replace all the files with the new ones from the MODX zip file. Keeping the old ones might be part of the issue.

        Try this:

        Download a new copy of the MODX zip file onto the server, then unpack it on the server itself. Copy the files from the extracted folder (all of them) and replace every file in your installation directory regardless of date.

        Then delete the core/cache files and clear your browser cookies and cache. Rename your .htaccess file for the time being. That could also be part of the problem.

        Run setup as is, and select upgrade. Hope... :~}

        To properly revert to a previous MODX version like you're trying to do now will require running setup with the install files from that version, not just copying the core, connectors, and manager folders. You can find out which version you had installed in the system_settings table from your backup. It's shown in the settings_version record. Make sure to overwrite all the files when downgrading.

        I'd also check your settings in php.ini. The site suddenly going weird is fishy. Maybe the host did something. I just recently found PHP downgraded to 5.2 on one server, and I am 1000% positive that I did not do that (I did the opposite three weeks ago actually). I've also seen a server decide to switch box names randomly which changes the server path and confuses the heck out of MODX.


          Frogabog- MODX Websites in Portland Oregon
          "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
          Having server issues? These guys have MODX Hosting perfected - SkyToaster
          • 40186
          • 28 Posts
          Thanks for responding! 8D

          "Did you FTP the files onto the server?"

          I did. Somewhat time-consuming.

          "FTP can corrupt or miss files."

          Hm, noted. I did not know that it could corrupt or lose files. That's effed up. I DO know that because it operates on a by-the-file basis, FTP is slow as a Class 9 Slowbot from Planet Molassas.

          I've heard there are ways to FTP a big ZIP or TAR file, and then unpack it on the site, but I wouldn't even know how to begin doing that.

          "Also, there's no reason not to just replace all the files with the new ones from the MODX zip file."

          Really?

          I was reading here:

          http://rtfm.modx.com/display/revolution20/Upgrading+MODx

          The entire section for Uploading The Files makes a big noise about MERGING directories, and not overriding them.

          So, I will be completely replacing the entire contents of the CONNECTORS, CORE, and MANAGER directories with the revised ones from the upgrade?

          I'm a little worried about losing something from the old site. Will I lose content or my installed packages or such stuff if I replace those directories entirely?

          "Download a new copy of the MODX zip file onto the server, then unpack it on the server itself."

          Please forgive what might sound appallingly dumb of me, but I'm not sure how I'd actually DO that. I don't think I have any kind of telnet or shell access, and I wouldn't even know how to do it if I did. (sorry -- I feel pretty dumb admitting that -- I used to telnet like crazy back in the 90's, but it looks like no one allows that anymore...?)

          (I can follow a tutorial if you can point me to one, though)

          "Run setup as is, and select upgrade."

          Presumably "upgrade an existing installation"?

          I think I was trying that earlier, but I'm willing to try it again ith the thought in mind that there may have been a corrupt or missing file here and there as a result of the FTP operation.

          "I'd also check your settings in php.ini."

          Is that in the Revolution folders somewhere?

          "The site suddenly going weird is fishy."

          Yeah, it was a little disconcerting for me. cool I use the site every day. Suddenly, kablooie.

            • 40186
            • 28 Posts
            Okay...

            I've loaded everything from the server itself, now, instead of FTPing files over. (had to have myself walked through this by a buddy)

            Running setup...

            Language: English [Select]

            Welcome to installation. [Next]

            I cannot choose "Upgrade Existing Install" -- only "new Installation."

            I cannot choose "Advanced Upgrade Install" either.

            Considering the big giant warning "Please note this option may overwrite any data inside your database." I'm not inclined to go any further.

            Still dead.

            Suggestions?

              • 41570
              • 6 Posts
              Edward, I am pretty sure I just went through exactly what you are describing last week. I had 3 team members working and editing files and all of sudden the manager blanked out, and went downhill from there as you are stating..

              I actually tried your same steps, receiving the same results, my fix was the following..


              • Grabbed a backup of db from phpmyadmin
              • Dumped the whole db
              • Removed core/cache files
              • Uploaded complete release via ftp (*from fresh download just to make me feel better smiley
              • Ran a NEW install
              • Got core site with manager running
              • Imported my backup db
              • Did a happy dance because everything was back <<-- most important part smiley

              Hope that helps a little
                • 40186
                • 28 Posts
                Ah, intriguing...

                "Grabbed a backup of db from phpmyadmin | Dumped the whole db"

                What's the difference between these two? I have a backup of the db.

                "Ran a NEW install | Got core site with manager running"

                So you basically built a brand new site from scratch? Did you leave any content in the directories? What about your assets, your plug-ins, your CSS and stuff? Was all that preserved?

                "Imported my backup db"

                And the newer version of Revolution took it and didn't have a problem?

                "Hope that helps a little"

                Oh, if I was fairly confident that I wouldn't lose my content (>700 pages), structure, styles, and the other miscellaneous folders in the same directory (a downloads folder, an images folder, etc.), then it would be awesome. I'd be up-to-date and running again.
                • Tried to reply earlier, but the guest wi-fi stopped working near the elevator and it never sent.

                  Back up your files before you do anything. You should be able to make a compressed file on your server, in the file management or backup area. Not a bad idea to do it now and again anyway. What I did recently was to just FTP the files to my machine, and then I put them right back.

                  BUT... essentially s/he's saying you'll follow the directions for moving your site to another server, except you'll install fresh and then import your db. Re-run setup afterwards and place the files you need back into the file structure.

                  I'm confused about why your last setup didn't catch the existing db. Are you positive that you uploaded the files into the correct folder? It only comes up as New Installation when there are no configured files in the folder. If you overwrote all the files, there should be existing config files telling setup to talk to the db. When you access setup, are you at http://yoursite.com/setup or is the path different?

                  Your php.ini is a file that might be in your MODX installation root if your server allows it to be. Otherwise, there will be some kind of way to configure it your control panel on the server. A CGI interface, or PHP Config. Your host's help area should tell you how to configure it.

                  Sorry about the overwrite vs merge thing. I haven't ftp'd to a server since the first time when I realized it was going to take forever and canceled. Plus I probably haven't read the upgrading instructions for a couple years now, heh... When I upgrade I just upload the zip file to the server, extract it, and then copy the files into the install directory. To tell you the truth, I forgot to worry if they were overwriting or merging long ago. I haven't had an issue yet while upgrading this way, and I also re-run setup on existing installations the same. I need to be more cautious on servers I'm unfamiliar with, so thanks for the reminder.
                    Frogabog- MODX Websites in Portland Oregon
                    "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
                    Having server issues? These guys have MODX Hosting perfected - SkyToaster
                    • 40186
                    • 28 Posts
                    "...except you'll install fresh and then import your db."

                    And the site'll take the old db okay? The Revo revision is slightly different.

                    I'm kinda low-level terrified I'll lose all my work on the site, which would be a real pain.

                    "I'm confused about why your last setup didn't catch the existing db. Are you positive that you uploaded the files into the correct folder?"

                    Puzzles me, too.

                    My web folder contains exactly this:

                    [assets] (looks like stuff from my previous install)
                    [connectors] (just added yesterday)
                    [connectors_OLD] (cleverly renamed!)
                    [core] (just added yesterday
                    [core_OLD] (cleverly renamed)
                    [downloads_alpha] (a download directory I use for contractors)
                    [images] (a directory containing images)
                    [manager] (just installed yesterday)
                    [manager_OLD] (cleverly renamed)
                    [downloads_uno] (a download directory I use for contractors)
                    [setup] (just installed yesterday)
                    [test] (a test folder I used for making sure I operated my shell commands properly -- I expect I'll delete it in a minute)

                    When I access Setup, I am at site/setup. I'll try again after this post to confirm.
                      • 40186
                      • 28 Posts
                      Still only the New Installation option.

                      But based on your note, I explored more deeply...

                      This is intriguing...

                      In the file called config.core.php is the following:

                      <?php
                      define('MODX_CORE_PATH', dirname(__FILE__) . '/core/');
                      define('MODX_CONFIG_KEY', 'config');


                      But in the file config.core.php_OLD3 (the most recent version associated with the site) is the following:

                      <?php
                      define('MODX_CORE_PATH', '/home/edwardmartiniii/hellbendermedia.com/core/');
                      define('MODX_CONFIG_KEY', 'config');
                      ?>


                      The new one seems... malformed.

                      Should I correct the new file with the path information from the old file and then close the PHP code?