Modx manager not working after migration to another server

Hi,

I migrated the Modx website from one server, to another, on the same domain. The front-end works fine.

I can login to the manager, but I do not see any content, I just see a “spinning wheel”, also under “system settings”. I cleared all caches, logged out all session, and I followed all the recommended steps from the Modx manual. I even re-run setup again.

I enabled debug level 4 from within the database, so I got this error message:

[2024-03-13 22:25:52] (INFO @ domains/mywebsite.be/public_html/core/model/modx/processors/system/config_check.inc.php : 74) [configcheck] core has not been moved outside web root!
[2024-03-13 22:25:52] (ERROR @ domains/mywebsite.be/public_html/core/cache/mgr/smarty/default/7751b3cf21560e17117e0c82cfa95a587d3570b2_0.file.header.tpl.php : 75) PHP warning: Undefined array key "a"
[2024-03-13 22:25:52] (ERROR @ domains/mywebsite.be/public_html/core/cache/mgr/smarty/default/7751b3cf21560e17117e0c82cfa95a587d3570b2_0.file.header.tpl.php : 80) PHP warning: Undefined array key "a"
[2024-03-13 22:25:52] (ERROR @ domains/mywebsite.be/public_html/core/cache/includes/elements/modplugin/5.include.cache.php : 101) PHP warning: Cannot modify header information - headers already sent by (output started at domains/mywebsite.be/public_html/core/model/modx/modresponse.class.php:170)

[2024-03-13 22:26:42] (ERROR @ domains/mywebsite.be/public_html/core/cache/mgr/smarty/default/34bb1bdbdf3fcca7f5904deb1eda538553411944_0.file.login.tpl.php : 103) PHP warning: Undefined array key "modahsh"
[2024-03-13 22:26:42] (ERROR @ domains/mywebsite.be/public_html/core/cache/mgr/smarty/default/34bb1bdbdf3fcca7f5904deb1eda538553411944_0.file.login.tpl.php : 103) PHP warning: Attempt to read property "value" on null
[2024-03-13 22:26:42] (ERROR @ domains/mywebsite.be/public_html/core/cache/mgr/smarty/default/34bb1bdbdf3fcca7f5904deb1eda538553411944_0.file.login.tpl.php : 129) PHP warning: Undefined array key "_post"
[2024-03-13 22:26:42] (ERROR @ domains/mywebsite.be/public_html/core/cache/mgr/smarty/default/34bb1bdbdf3fcca7f5904deb1eda538553411944_0.file.login.tpl.php : 129) PHP warning: Attempt to read property "value" on null
[2024-03-13 22:26:42] (ERROR @ domains/mywebsite.be/public_html/core/cache/mgr/smarty/default/34bb1bdbdf3fcca7f5904deb1eda538553411944_0.file.login.tpl.php : 129) PHP warning: Trying to access array offset on value of type null

[2024-03-13 22:26:43] (ERROR @ domains/mywebsite.be/public_html/core/cache/includes/elements/modplugin/5.include.cache.php : 215) PHP warning: Undefined array key 0
[2024-03-13 22:26:43] (ERROR @ domains/mywebsite.be/public_html/core/cache/includes/elements/modplugin/5.include.cache.php : 355) PHP warning: Undefined variable $cacheHash
[2024-03-13 22:26:43] (ERROR @ domains/mywebsite.be/public_html/core/cache/includes/elements/modplugin/5.include.cache.php : 356) PHP warning: Undefined variable $cssCombinedFile
[2024-03-13 22:26:44] (INFO @ domains/mywebsite.be/public_html/core/xpdo/om/xpdoobject.class.php : 1714) Removed modSession instance with primary key b962oe8jfhpkkvqatiaos0cnnd
[2024-03-13 22:26:44] (INFO @ domains/mywebsite.be/public_html/core/model/modx/modsessionhandler.class.php : 165) There was an error retrieving or creating session id: 1noddne88knupjl5c2f4n42jmg

Can anybody point out how I can fix this issue ?
What could be the reason ?

Thank you!

When you open the developer tools in the browser, are there error messages in the “Console” tab? Are there requests that fail in the “Network” tab? What is their HTTP response code?

hi Harry,

Thank you for your response.

I see indeed lots of console log JS errors when I am logged in in the “stuck” manager environment.

modx.config.js.php:1 Uncaught SyntaxError: Unexpected token ';'
multiuploaddialog.js:3 Uncaught TypeError: Cannot read properties of undefined (reading 'toLowerCase')
    at multiuploaddialog.js:3:58
    at multiuploaddialog.js:563:3
modx.js?v=ee770a95:1042 Uncaught TypeError: Cannot read properties of undefined (reading 'id')
    at MODx.HttpProvider.readState (modx.js?v=ee770a95:1042:65)
    at new MODx.HttpProvider (modx.js?v=ee770a95:897:14)
    at MODx.Layout [as constructor] (modx.layout.js:25:14)
    at new MODx.Layout.Default (layout.js:6:48)
    at Object.create (ext-all.js:21:133120)
    at MODx.load (modx.js?v=ee770a95:85:38)
    at manager/:52:10
    at ext-all.js:21:2438
    at b (ext-all.js:21:19924)
ext-all.js:21 Uncaught TypeError: Cannot read properties of undefined (reading 'request')
    at constructor.execute (ext-all.js:21:315979)
    at constructor.load (ext-all.js:21:314749)
    at MODx.grid.Grid [as constructor] (modx.grid.js:115:21)
    at new MODx.grid.WhoIsOnline (modx.grid.user.online.js:42:48)
    at Object.create (ext-all.js:21:133120)
    at MODx.load (modx.js?v=ee770a95:85:38)
    at manager/:66:14
    at ext-all.js:21:2438
    at b (ext-all.js:21:19924)
ext-all.js:21 Uncaught TypeError: Cannot read properties of undefined (reading 'request')
    at constructor.execute (ext-all.js:21:315979)
    at constructor.load (ext-all.js:21:314749)
    at MODx.grid.Grid [as constructor] (modx.grid.js:115:21)
    at new MODx.grid.RecentlyEditedResourcesByUser (modx.grid.user.recent.resource.js:44:68)
    at Object.create (ext-all.js:21:133120)
    at MODx.load (modx.js?v=ee770a95:85:38)
    at manager/:73:10
    at ext-all.js:21:2438
    at b (ext-all.js:21:19924)
s.gif:1 
        
        
       Failed to load resource: the server responded with a status of 404 ()
manager/undefined?action=system/dashboard/widget/feed&feed=news:1 
        
        
       Failed to load resource: the server responded with a status of 404 ()
manager/undefined?action=system/dashboard/widget/feed&feed=security:1 
        
        
       Failed to load resource: the server responded with a status of 404 ()
modx.js?v=ee770a95:117 Uncaught TypeError: Cannot read properties of null (reading '1')
    at MODx.onAjaxException (modx.js?v=ee770a95:117:31)
    at h.Event.fire (ext-all.js:21:3699)
    at Ext.data.Connection.fireEvent (ext-all.js:21:687)
    at Ext.data.Connection.handleFailure (ext-all.js:21:51281)
    at f (ext-base.js:21:18140)
    at m (ext-base.js:21:18302)
    at ext-base.js:21:8604
favicon.ico:1 
        
        
       Failed to load resource: the server responded with a status of 404 ()
modx.js?v=ee770a95:117 Uncaught TypeError: Cannot read properties of null (reading '1')
    at MODx.onAjaxException (modx.js?v=ee770a95:117:31)
    at h.Event.fire (ext-all.js:21:3699)
    at Ext.data.Connection.fireEvent (ext-all.js:21:687)
    at Ext.data.Connection.handleFailure (ext-all.js:21:51281)
    at f (ext-base.js:21:18140)
    at m (ext-base.js:21:18302)
    at ext-base.js:21:8604

This error looks similar as in this thread:

The first thing to try is manually deleting all files in the core/cache directory and visiting the site with your browser in incognito or private mode. If that works, clear your browser cache and cookies.

If not, double-check the values in the core/config/config.inc.php file, especially the connector ones. Setup is supposed to straighten these out, (you did run Setup after moving the site, right?). Sometimes it doesn’t quite work, especially when moving from a localhost site, or when the old site has hard-coded paths and/or URLs. This often leads to an OK front end and a futzed Manager.

If you transferred the files individually with FTP, this often results in missing or corrupted files. Instead, zip up the files on the old server and unzip them on the new one.

Hi Bob,

Clearing the core/cache & private mode did not work unfortunately.

The values in the core/config/config.inc.php are correct.

I did upload everything with a ZIP file already.

I have in my initial post the output of the modx error log, and in the 2th post the Javascript console log errors. It seems some cache variables are undefined. Maybe I need to change those in the SQL database system_settings ?

Thanks

It looks like you’ve eliminated most of the common error possibilities.

The error messages indicate that you might have a problem with one of your widgets. The next step I would try is to remove all the widgets from all the dashboards. A widget could have a problem that disrupts the Manager page, or it could be in conflict with another widget. On rare occasions, the order of the widgets on a dashboard will cause a problem.

Go to your DB, and in the modx_dashboard_widget_placement table, delete all the records. This will not delete or alter any dashboard widgets. You can easily put them back. All it will do is disconnect them from any dashboard.

Manually clear the cache files, and visit in private mode for testing. I that fixes things, you can add them back one at a time to figure out which one is breaking things. I’d suggest adding the two “feeds” last, since they’re the most likely culprits.

If that doesn’t work, I’d disable all plugins. In the modx_site_plugins table, change the disabled field to 1 for all the plugins.

Clear the cache again and visit in private mode.

If that doesn’t work, the next most likely issue is some kind of JavaScript conflict, which is not something I’m very good at diagnosing.

hi Bob,

I appreciate your insights. I applied them all with no success unfortunaltely.

I can still login, but nothing to access in the back-end, only a “spinning wheel” and JS-errors.

Maybe this screenshot will clarify more ?

In the developer tools, change to the “Network” tab and reload the page.
The request that load connectors/modx.config.js.php has an incorrect response value. What’s in the response?