We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27773
    • 2 Posts
    Hello!

    We got a new client who is using MODx. They are transferring their hosting over to our server. The previous developer gave us all of the live files and the database on a CD. We uploaded and set everything up on our server and we get the following error:

    SQL: SELECT id, introtext, pagetitle FROM modx_site_content WHERE parent= AND published = 1 ORDER BY publishedon DESC LIMIT 4;

    Can anyone help us figure out how to fix this?

    Please let me know. Thanks!
      • 4310
      • 2,310 Posts
      In danger of stating the obvious
      WHERE parent=
      will cause an error, needs to be an integer, or removed.
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        That looks like a Ditto process missing its start point value, which is often taken from a TV or even another snippet’s returned value. Check the Ditto call on the page in question. You also might want to clear the cache; that should have been done before saving the backup. Sometimes moving cache files along with the rest of the site can cause odd problems.
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 22303 MODX Staff
          • 10,725 Posts
          This is why I always run the install in upgrade mode anytime I move a site to a new server, as it automatically re-builds the assets/cache/siteCache.idx.php file, which you have to copy from the other server. Depending on how your site is constructed, what chunks and snippets and plugins you have, etc., determines whether or not your siteCache is portable or needs to be re-built after moving servers. I tend toward caution and always run the installer when moving sites.
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            Hmmm... I wonder if it would be possible to make a cut-down version of the installer just for this purpose. No need for all the intro pages, license acceptance, selection of modules/snippets, etc.
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
              • 22303 MODX Staff
              • 10,725 Posts
              Quote from: sottwell at Jul 25, 2008, 03:13 AM

              Hmmm... I wonder if it would be possible to make a cut-down version of the installer just for this purpose. No need for all the intro pages, license acceptance, selection of modules/snippets, etc.
              IMHO, if the cache file doesn’t exist, it should be rebuilt automatically on first request after the move, whether that request is to the manager or to the front-end.  This is how Revolution works; at any point in time you can simply deleted the cache files and they get rebuilt automatically on the next request.
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                Indeed, I got bit once because that’s what I expected it to do. It is certainly a logical thing to do.
                  Studying MODX in the desert - http://sottwell.com
                  Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                  Join the Slack Community - http://modx.org
                  • 27773
                  • 2 Posts
                  Thank you everyone for your input. I will try these things out and post my results.

                  Cheers.