We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 53508
    • 6 Posts
    Hello everybody, this is my first post since I'm a rookie in Modx smiley

    I'm trying to move a site from an existing Modx 2.5.1 server to a brand new host powered by Google Cloud Platform.

    The new site has been created using Bitnami launcher. This launcher has installed PHP/MySQL/Apache and Modx 2.5.7.

    To perform the host change I have done all the steps written in official documentation from this link: https://docs.modx.com/revolution/2.x/administering-your-site/moving-your-site-to-a-new-server

    I have zipped all files from my old server and move it to the new one. Since Bitnami launcher has a base Modx site (root folder creaed at /opt/bitnami/apps/modx/) I have unzipped my old site's files under a new and separate folder in the new host (location of my root at the new host: /home/myself/my_new_site/public_html/). Then I have updated my paths in config.inc.php and config.core.php. Also I have created a new user in my new host's MySQL Server (same username as the one I had @ old server) and uploaded my database.

    After updating .htaccess I have cleared the cache folder of my new location (/home/myself/my_new_site/public_html/core/cache) and tried to run setup. Here my problems started since I had a blank page.

    But I was still able to open the manager, so I look into the logs and I found these entries each time I wanted to open my site in the new host:

    [2017-06-05 18:23:08] (ERROR @ /opt/bitnami/apps/modx/core/xpdo/xpdo.class.php : 644) Could not load class: MinifyX from minifyx.
    [2017-06-05 18:23:08] (ERROR @ /opt/bitnami/apps/modx/core/xpdo/xpdo.class.php : 1247) Problem getting service minifyx, instance of class MinifyX, from path /opt/bitnami/apps/modx/core/components/minifyx/model/minifyx/
    [2017-06-05 18:23:08] (ERROR @ /opt/bitnami/apps/modx/core/cache/includes/elements/modsnippet/19.include.cache.php : 39) PHP warning: include_once(/opt/bitnami/apps/modx/core/components/wayfinder/wayfinder.class.php): failed to open stream: No such file or directory
    [2017-06-05 18:23:08] (ERROR @ /opt/bitnami/apps/modx/core/cache/includes/elements/modsnippet/19.include.cache.php : 39) PHP warning: include_once(): Failed opening '/opt/bitnami/apps/modx/core/components/wayfinder/wayfinder.class.php' for inclusion (include_path='.:/opt/bitnami/php/lib/php')
    [2017-06-05 18:23:08] (ERROR @ /opt/bitnami/apps/modx/core/xpdo/xpdo.class.php : 644) Could not load class: Wayfinder from wayfinder.
    [2017-06-05 18:23:08] (ERROR in resource 1 @ /opt/bitnami/apps/modx/core/model/modx/modparser.class.php : 1353) Bad link tag `[[~939]]` encountered
    [2017-06-05 18:23:08] (ERROR @ /opt/bitnami/apps/modx/core/cache/includes/elements/modsnippet/19.include.cache.php : 39) PHP warning: include_once(/opt/bitnami/apps/modx/core/components/wayfinder/wayfinder.class.php): failed to open stream: No such file or directory
    [2017-06-05 18:23:08] (ERROR @ /opt/bitnami/apps/modx/core/cache/includes/elements/modsnippet/19.include.cache.php : 39) PHP warning: include_once(): Failed opening '/opt/bitnami/apps/modx/core/components/wayfinder/wayfinder.class.php' for inclusion (include_path='.:/opt/bitnami/php/lib/php')
    [2017-06-05 18:23:08] (ERROR @ /opt/bitnami/apps/modx/core/xpdo/xpdo.class.php : 644) Could not load class: Wayfinder from wayfinder.
    [2017-06-05 18:23:08] (ERROR @ /opt/bitnami/apps/modx/core/xpdo/xpdo.class.php : 644) Could not load class: minishop2 from minishop2.
    [2017-06-05 18:23:08] (ERROR @ /opt/bitnami/apps/modx/core/xpdo/xpdo.class.php : 1247) Problem getting service minishop2, instance of class minishop2, from path


    I have changed some folders permissions to 777, I have edited php.ini and removed semicolon from "extension=php_pdo_mysql.dll" ... But the problem persists. Don't know waht else to do.

    I'm confused: why these log entries refers to default Modx installation path (/opt/bitnami/apps/modx/) instead the root of my site (/home/myself/my_new_site/public_html/)?

    I cleared the cache items under default Modx(/opt/bitnami/apps/modx/core/cache) and then I had a blank page when trying to open manager.

    Do you think it's because my old site was in 2.5.1 version and the new host has 2.5.7? I guess it shouldn't be a problem since I'm going into a newer version ... I'm I right?

    I woudl really appreciate your help.

    Thanks!!!
      • 17301
      • 932 Posts
      It does sound like a paths issue. Did you change the paths in ALL of the config files listed in the documentation? Were the changes submitted/written to the server ok?
        ■ email: [email protected] | ■ website: https://alienbuild.uk

        The greatest compliment you can give back to us, is to spend a few seconds leaving a rating at our trustpilot: https://uk.trustpilot.com/review/alienbuild.uk about the service we provided. We always drop mention of services offered by businesses we've worked with in the past to those of interest.
        • 53508
        • 6 Posts
        Hello LK, thanks a lot for your comments. Yes, it was related to the paths. Since I have two sets of config files, I was changing the ones related with my old server. I updated the ones in the new host and I can load Manager and The site.

        But for some reason CSS are not applied and other assets like images are not displayed. Not sure why, all assets are under "assets" folder, which is at the same level of core/manager/connectors folder.

        If have an idea where to look to solve this problem, please let me know.

        Regards.
          • 22840
          • 1,572 Posts
          Make sure you have the base href set and have deleted the core/cache folder since you got the manager working, also make sure you have edited the config in root, html or www, core and connectors
            • 53508
            • 6 Posts
            Quote from: paulp at Jun 06, 2017, 03:51 PM
            Make sure you have the base href set and have deleted the core/cache folder since you got the manager working, also make sure you have edited the config in root, html or www, core and connectors

            Thanks Paulp, Yes I have cleared the cache. The base href has been set to http://my-ip/
            All config.core.php has been edited and are pointing to my root folder: /home/myself/my_new_site/public_html/core/

            Resources, like images are pointing to http://my-ip/assets/images/xxx.jpg
            My base CSS is pointing to http://my-ip/assets/css/main.css

            assets folder is under: /home/myself/my_new_site/public_html/assets/ ... there I have a folder for css, images, js, etc

            When I call http://my-ip/setup the site is loaded (without styles) and I can't run setup again.
              • 3749
              • 24,544 Posts
              Make sure you have this tag (with the exclamation point) in the head section of of all templates:

              <base href="[[!++site_url]]" />


              Are you sure the setup directory is still there? It's removed by default during the install.

                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
                • 53508
                • 6 Posts
                Quote from: BobRay at Jun 06, 2017, 05:53 PM
                Make sure you have this tag (with the exclamation point) in the head section of of all templates:

                <base href="[[!++site_url]]">


                Are you sure the setup directory is still there? It's removed by default during the install.


                Thanks for your reply Bob! and thanks for your blog too, I have learned a lot of things from you (y).

                I have added the exclamation mark and the problem persists: no style, no images, no assets (code extract included):

                <base href="[[!++site_url]]" />
                <title>[[*longtitle:default=`[[*pagetitle]]`]] - [[++site_name]]</title>
                [[MinifyX?
                &minifyCss=`1`
                &registerCss=`1`
                &minifyJs=`1`
                &registerJs=`1`
                &jsSources=`
                [[++assets_url]]components/themebootstrap/js/bootstrap.min.js
                `
                ]]
                <link href="favicon.png" rel="shortcut icon" type="image/vnd.microsoft.icon" />
                <link rel="stylesheet" href="[[++site_url]]assets/css/reset.css">
                <link rel="stylesheet" href="[[++site_url]]assets/css/main.css">
                <script src="[[++assets_url]]components/themebootstrap/js/jquery.min.js"></script>
                <link rel="stylesheet" href="[[++site_url]]assets/css/colorbox.css">


                Also I have verified that setup folder is still there: /home/myself/my_new_site/publlic_html/setup (see attached image).

                No clues about the problem, maybe its because I didn't install Modx by myself and let Bitnami launcher install everything in my cloud - virtual machine? Perhaps there's something missing or extra within apache or php config that is causing this problem.

                I'll continue my investigation and will let you know in case I found the issue.

                Thanks a lot for your interest and your advice.
                  • 53508
                  • 6 Posts
                  BTW there's a problem in this forum, I can't attach images (PNG files)
                    • 3749
                    • 24,544 Posts
                    Did you delete all files in the core/cache directory before testing?

                    If that doesn't work:

                    First, I would turn off friendly URLs (in the DB if necessary), and rename .htaccess to something else, just to take that out of the equation.

                    Then, double-check the paths in the four config.core.php files: root, manager, setup, and connectors directories.

                    Than, double-check all the paths in the core/config/config.inc.php file.


                    At least 90% of the problems in moving a site come from those spots.

                    Always delete the core/cache files after making a change and before testing.

                      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
                      • 17301
                      • 932 Posts
                      Inspect your code on the front-end side and look at the path to the stylesheet and then that should help in diagnosing the problem. See if you can open it by navigating to that path and try to work out if you're missing any forward slashes or anything else to make the path work.
                        ■ email: [email protected] | ■ website: https://alienbuild.uk

                        The greatest compliment you can give back to us, is to spend a few seconds leaving a rating at our trustpilot: https://uk.trustpilot.com/review/alienbuild.uk about the service we provided. We always drop mention of services offered by businesses we've worked with in the past to those of interest.