Manager page is blank after migration

Hi Guys,

I’ve just migrated a website from staging to live. I followed standard procedure; setup new install, import database, move files over excluding certain ones.

The site shows however I cannot login to the manager. It shows as an empty blank screen.

I’ve checked all paths in the config files and they are all correct. Any ideas what might be causing this?

Are there any (useful) error messages in the error log (core/cache/logs) or maybe in the console of the browser’s developer tools?

Yes there is a repeating error saying:

[2022-01-10 12:05:43] (ERROR @ …/public_html/core/xpdo/xpdo.class.php : 503) Path specified for package gallery is not a valid or accessible directory: …/public_html/core/components/gallery/model/

And have you check if the folder core/components/gallery/model/ exists and has the correct file permissions?

Are the sites on the same version of PHP or MODX? What Dashboard widgets have you got installed? Some older dashboard widgets will silently fail and have no exit at failure like old versions of Google Analtics Dashboard and Quickbuttons. Usually you’ll see the 500s in the server’s error log vs in the MODX error log.

Some Extras may also require reinstall, you may be able to access the Extras Installer by going to manager/?a=workspaces.

Thanks for the helps guys, looking in my core folder it is missing a components folder so that most likely will be the issue. I’m unable to see if this fix works at the moment as I now have to use a different server as the clients server is halting progress as their support don’t understand the problems that they are causing. I’ll check back soon with the results!

I managed to get it working. I had to manually disable the add-ons in the database, delete the add-on files and reinstall them.

Every time I migrate a modx site I end up spending hours fixing things. Is this normal?

No, it’s not. For the most part, with the exception of a couple of Extras that have stored paths and different versions of PHP between your dev and production environments this should be relatively straightforward. In my opinion, the most effective way to do migrations is via MySQL dump and rsync over the command line but it can be done via SFTP if needed.

Here’s the fastest way to do it via mysqldump/rsync.

This method requires the destination Cloud to have an install of MODX of the same version as the origin/dev environment.

Via the commanline on your dev environment, export the db using mysqldump as follows by running the command with appropriate replaced with the real names.

mysqldump --add-drop-table -u <user> -p <db_name> > db.sql

To avoid bringing over unnecessary things create a rsync.filter file to tell rsync which files to bring over and which to omit by using your commandline text editor and placing this in the root of your source site:

+ /assets/ 
+ /assets/* 
+ /core/ 
+ /core/components/
+ /core/packages/ 
- /core/* 
- /core/packages/core/
- /core/packages/config.core.php 
- /cgi-bin/ 
- /manager/
- /phpmyadmin/ 
- /phpMyAdmin/ 
- /setup/ 
- /index.php
- /config.core.php 
- /connectors/config.core.php
- /rsync.filter 

Then from your dev or source environment in the webroot directory of the site you’re planning on moving, run the rsync command as follows, with the appropriate replacements:

rsync -azvvP --no-p ./ <username>@<domainname.com:filepathtowebroot> --filter=". rsync.filter"

Finally, import the db (that was in the webroot of the files you just moved to the destination server). SSH into the destination server and run the following from the webroot:

mysql -u <user> -p <destination_db_name> < db.sql

Make sure to change the fields above.

There are other ways to do it and you don’t always have SSH access on your destination server, but where you do, this literally takes minutes when you follow the steps.