We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 45681
    • 8 Posts
    Hi everyone, I'm having a really weird bug during the migration of my site.

    So, I followed this guide
    http://rtfm.modx.com/revolution/2.x/administering-your-site/moving-your-site-to-a-new-server

    I followed every step multiple times and double-checked that I did everything correctly.
    However, I'm having a weird situation in which, even though the chunks are present in the CMS, for some of them the content is completely empty. The empty chunks are always the same but they don't seem to follow any kind of logic. Some are empty, some are not, there's not pattern to it.
    I checked the database, and the content is indeed there: only MODx isn't able to read it... for some reason.
    I tried searching but found nothing of the sort. No errors are given during any step and everything proceeds smoothly.

    Any clue? I'm kind of stumped on this.
      • 3749
      • 24,544 Posts
      Try logging out, deleting all files in the core/cache directory, and clearing your browser cache and cookies.
        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
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        Sounds like the new server is having trouble with something in the affected chunks' content. Do they have any special characters, like (r) or currency symbols? Are you sure that the databases have the same charset and collation configuration?
          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
          • 3749
          • 24,544 Posts
          I could also be a case of mod_security rearing it's ugly head.
            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
            • 45681
            • 8 Posts
            Quote from: BobRay at Nov 11, 2013, 02:12 PM
            Try logging out, deleting all files in the core/cache directory, and clearing your browser cache and cookies.
            Did this before and after the migration, nothing changes.

            Quote from: sottwell at Nov 11, 2013, 02:22 PM
            Sounds like the new server is having trouble with something in the affected chunks' content. Do they have any special characters, like (r) or currency symbols? Are you sure that the databases have the same charset and collation configuration?
            I made sure that both DB's had the same configuration and everything.
            It can't even be a software or configuration mismatch since both instances run on the same everything: we are basically duplicating the instance on the same server.
            Before this raises any questions, I really doubt this has anything to do with it - we have like 10 different MODx's instances, both revo and evo, that we "migrated" on the same server using the guide and none of them ever had a problem. But just pitching it out there.

            EDIT
            Forgot a part of the answer
            Quote from: sottwell at Nov 11, 2013, 02:22 PM
            Do they have any special characters, like (r) or currency symbols?
            Yes, but on the original site it created no problem. The charset is the same in the two DB's, so it's not even that. [ed. note: deyoppe last edited this post 12 years, 11 months ago.]
              • 3749
              • 24,544 Posts
              Check the character sets of the individual tables and the text fields within the tables. They don't necessarily match the charset of the DB.
                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
                • 45681
                • 8 Posts
                All tables have collation utf8_general_ci. And regardless, the DB was dumped using mysqldump and recreated with mysql, so they should have the same identical schema.

                I also wondered if I made any mistakes with the folder permissions. Made sure all folders and files had the same owner and that permission were the same. In a fit of rage I even 777'd everything: still no dice.
                  • 3749
                  • 24,544 Posts
                  Have you tried 755 and 644? That's necessary at a lot of hosts. In those cases looser permissions like 777 will fail.
                    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
                    • 45681
                    • 8 Posts
                    Quote from: BobRay at Nov 13, 2013, 02:53 PM
                    Have you tried 755 and 644? That's necessary at a lot of hosts. In those cases looser permissions like 777 will fail.
                    Thanks BobRay.
                    Just tried this. 755 changes nothing, and 644 locks me out with 403 forbidden.

                    I think it's some sort of database integrity problem, as if the chunks are recorded in the DB but they're not associated with the correct content record. However, one of the affected chunks are in the modx_site_htmlsnippets table, and the correct content is stored. It just doesn't fetch it. [ed. note: deyoppe last edited this post 12 years, 11 months ago.]
                      • 3749
                      • 24,544 Posts
                      Do the problem chunks show up in the Element tree?
                        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