We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5948
    • 32 Posts
    Hi All,

    I have just finished my data migration script and after running it all looks fine at first glance. I the go to make a change to a page. Upon saving this page the main frame returns nothing. If I then edit the same page my changes have been saved. I have 885 page in the site and its on its own server. So I don’t get the MODx is cleaning up message and the site tree frame is not updated to reflect my changes. Any ideas or has anyone had this problem before.
      • 5948
      • 32 Posts
      Also the navigation in the frontend is not showing up all the sections, could these problems be caused by the cache not being updated etc. I had a problem with the cache yesterday which caused a different problem with my script on my local machine, so I started again on my live server and did not get the same problem however I think this could be down to the cache file siteCache.idx.php not being up to date, any ideas
        • 5948
        • 32 Posts
        Bit of an update, the white screen only appears when I try to clear the cache, so i have unchecked the option to clear cache on page save etc which then reloads the main frame, however clear cache button still breaks here
          • 22303 MODX Staff
          • 10,725 Posts
          You should check the system events log in the manager and/or the server’s php error_log (if you can get access to it), but it is possible that you could be running out of memory during the cache clearing process. What is the size of your siteCache.idx.php and what is your php.ini memory_limit setting?
            • 5948
            • 32 Posts
            The sideCache file is 184kb and i have just up’d the PHP memory limit to 512m for now, but it still breaks. I don’t really want to have to keep the memory limit this high. The server is a completely dedicated machine with 4gb memory and should be able to stand a lot of strain. Is there a way to completely rebuild the siteCache file, with a repair etc???
              • 5948
              • 32 Posts
              Does 184k sound large? it has only got 2 of the sites pages in it, which I know is not right.
                • 5948
                • 32 Posts
                Checked anthoer MODx site i have done and 184k is small.

                I have an idea so if someone could let me know if this sounds sensible.

                My migration script loops through an xml file and call a recursive function to load the data for each page and get its place in the site structure. Once I save a page with the document class should I call the modx->clearCache(); function. Would this then add the last page to the cache? I think my problem is when I add the pages its to many for MODx to process at once.

                I am going to try the above, fingers crossed wink
                  • 22303 MODX Staff
                  • 10,725 Posts
                  It honestly sounds like you have an error in the data you’ve loaded into site_content, but without seeing the records you are creating, I’m not sure I can offer any more specific advice.
                    • 5948
                    • 32 Posts
                    Ahhhh, just found a page that split through with no pagetitle, this could be the problem. I will empty the database and try a fresh import clearing the cache as I go and checking for pages with empty titles. Thanks for the advice, you guys are great, I cant express the pain I have had on other Forums and trying to get a sensible answer from them *cough, cough* Drupal *spit, spit* wink
                      • 5948
                      • 32 Posts
                      Just an update, I was trying to set a lot of information for each page and have also now scraped my recursive function to build the site IA. Just Bit of a pain for me however the client informed me that they are considering changing the IA, not that I suggested this a couple of weeks ago rolleyes.

                      I have made it a lot simpler and am going to build it up one step at a time. I now have the script moving 885 pages from XML files into MODx, thanks for you help guys.

                      Once the site is finished it should be a good one for you to showcase on the MODx site, I cant mention who my client is at the moment, we cant mention anything until they sign off the final invoice unless stated otherwise, but they are large charity/organisation in the UK with about 200k visitor’s a month so this could be a good high profile site for you guys over here in the UK. grin


                      Thanks once again for your help and patience wink