Upgrade to MODX3 fails

Hi all, I tried multiple times to upgrade an existing site to MODX 3.0.1, it fails every time.

What I have done:
I successfully duplicated a working site (to test the upgrade without touching the productive site) running with modx 2.8.3 (hosted at Strato), tried all features: it works like the productive site.
Duplicated site runs like the original with PHP 8.0 and MySQL 5.7. (EDIT: tried all with 8.1 – same results.)
At first upgraded to version 2.8.4 successfully. No problems at all.

Then I logged out, cleared all sessions and deleted all content of the core/cache directory.
I transferred all files for the MODX 3.0.1 to the server, checked the core/cache directory (was empty) and started the setup. It runs successful.

But then the login screen is unstyled. Logged in the dashboard is destroyed: left side a slim blue column with the content of all menus unstyled, right side the dashboard content with empty widgets and loading animations.
(The website itself is ok, but I can’t use the manager.) EDIT: the website gives back an error 500.

The chrome web developer shows 4 errors:

Uncaught ReferenceError: Popper is not defined
    at MODx.Layout.Default.initPopper (modx.jsgrps-min.js?mv=301pl:50:192895)
    at y.Event.fire (ext-all.js:21:3547)
    at S.fireEvent (ext-all.js:21:668)
    at S.render (ext-all.js:21:128230)
    at S.applyToMarkup (ext-all.js:21:129757)
    at Ext.Component [as constructor] (ext-all.js:21:126311)
    at new S (ext-base.js:21:2335)
    at Object.create (ext-all.js:21:125217)
    at MODx.Layout.Default.createComponent (ext-all.js:21:156282)
    at MODx.Layout.Default.lookupComponent (ext-all.js:21:156201)
modx.panel.welcome.js?mv=301pl:120 Uncaught ReferenceError: Sortable is not defined
    at MODx.panel.Welcome.initDashboard (modx.panel.welcome.js?mv=301pl:120:9)
    at MODx.panel.Welcome.setup (modx.panel.welcome.js?mv=301pl:62:14)
    at new MODx.panel.Welcome (modx.panel.welcome.js?mv=301pl:52:10)
    at Object.create (ext-all.js:21:125217)
    at MODx.load (modx.js?v=f7160b6b:86:38)
    at MODx.page.Welcome._loadComponents (modx.jsgrps-min.js?mv=301pl:39:30094)
    at MODx.Component [as constructor] (modx.jsgrps-min.js?mv=301pl:39:28983)
    at new MODx.page.Welcome (welcome.js?mv=301pl:17:46)
    at Object.create (ext-all.js:21:125217)
    at MODx.load (modx.js?v=f7160b6b:86:38)
2modx.jsgrps-min.js?mv=301pl:39 Uncaught TypeError: Cannot read properties of undefined (reading 'doLayout')
    at constructor.load (modx.jsgrps-min.js?mv=301pl:39:103824)
    at y.Event.fire (ext-all.js:21:3547)
    at constructor.fireEvent (ext-all.js:21:668)
    at constructor.loadRecords (ext-all.js:21:304250)
    at Ext.data.HttpProxy.onRead (ext-all.js:21:320557)
    at Ext.data.HttpProxy.<anonymous> (ext-all.js:21:320083)
    at Ext.data.Connection.handleResponse (ext-all.js:21:47808)
    at f (ext-base.js:21:17840)
    at m (ext-base.js:21:18302)
    at ext-base.js:21:8604

Is there a way to solve this problem?

Does it help if you clear your browser cache?

No, doesn’t help. I always try something like this first.

And: I have two website built as new sites with a clean install of MODX 3.0.1. There are no JS errors like I described above.

Hey @videoschlumpf … this has happened with every site I’ve upgraded to 3.x - a CTRL-F5 at the login screen always sorts that for me.

But it sounds like you may have additional problems.

Could you share a screenshot of the Manager?

What extras do you have installed?

This is only a reload with clearing the cache. @joshualuckers asked if a clear cache helps. No, it doesn’t.

This is a screenshot of the manager:

My next steps:

  • deleting all data
  • new setup of database
  • new duplicating the files
  • upgrading to working version 2.8.4
  • then new steps: deleting all extras
  • clearing core cache
  • upgrade to 3.0.1

Postscript: all extras in this website:

  • CodeMirror
  • Collections
  • EasyCopyright
  • fastField
  • FirstChildRedirect
  • FormIt
  • getDate
  • getResources
  • getUrlParam
  • HTML2Minify
  • If
  • imgattr
  • lastModified
  • math
  • MIGX
  • ModxMinify
  • pdoTools
  • pThumb
  • redirectoid
  • Redirector
  • StageCoach
  • TinyMCE
  • translit

All extras are on the latest version.

Often these errors in the “Console” tab of the developer tools are only subsequent errors, caused by an unexpected result from a request. Maybe look at the (XHR) requests in the “Network” tab (of the developer tools) and check if there is an error message in the response.


Are there only errors on the dashboard page of the manager or also if you open other pages (e.g. yourdomain.com/manager/?a=resource/update&id=1)?

Maybe try deactivating the dashboard widgets (database table modx_dashboard_widget_placement).


If the same error is on every page of the manager maybe try deactivating the plugins one by one (database table modx_site_plugins → column disabled) to see if one of the plugins causes the error.

Thanks for the tips. I’ll give it a try … tomorrow. Need to reinstall the duplicated site first.

Ok, I made a mistake before. There are 3 config.core.php where I should have adjusted the paths. I had only done it in one file.

Now I have corrected all the paths. But after installing 3.0.1 over 2.8.4 the login page is completely without styling and after logging in I also see a completely unstyled manager.

And there are new error messages now:

An error occurred...
TypeError: count(): Argument #1 ($value) must be of type Countable|array, string given

Errors:
/###/htdocs/cms2022/core/src/Revolution/Processors/Workspace/Packages/GetList.php:218
MODX\Revolution\Processors\Workspace\Packages\GetList->checkForUpdates() in /###/htdocs/cms2022/manager/controllers/default/dashboard/widget.updates.php:78
modDashboardWidgetUpdates->render() in /###/htdocs/cms2022/core/src/Revolution/modDashboardWidgetInterface.php:81
MODX\Revolution\modDashboardWidgetInterface->process() in /###/htdocs/cms2022/core/src/Revolution/modDashboardWidget.php:134
MODX\Revolution\modDashboardWidget->getContent() in /###/htdocs/cms2022/core/src/Revolution/modDashboard.php:122
MODX\Revolution\modDashboard->render() in /###/htdocs/cms2022/manager/controllers/default/welcome.class.php:109
WelcomeManagerController->process() in /###/htdocs/cms2022/core/src/Revolution/modManagerController.php:178
MODX\Revolution\modManagerController->render() in /###/htdocs/cms2022/core/src/Revolution/modManagerResponse.php:114
MODX\Revolution\modManagerResponse->outputContent() in /###/htdocs/cms2022/core/src/Revolution/modManagerRequest.php:173
MODX\Revolution\modManagerRequest->prepareResponse() in /###/htdocs/cms2022/core/src/Revolution/modManagerRequest.php:143
MODX\Revolution\modManagerRequest->handleRequest() in /###/htdocs/cms2022/manager/index.php:60

(I have partially anonymised the full path)

Any ideas what I should do next? In this unstyled manager interface I can’t do any modifications.

This is the login screen:

And this the manager interface:

These error messages look a lot like the ones from another of your topics


You can still make modifications in the database with a tool like phpMyAdmin (for example in the database table modx_dashboard_widget_placement).

A new attempt this morning.
Reinstalled everything (first 2.8.4), adjusted all paths correctly.
All widgets removed.
All plugins deactivated.
Uninstalled all extras.
Cleared core/cache.
Installed 3.0.1 as upgrade.
Cleared cache, removed cookies.
Reinstalled the extras one by one.

Now the manager interface looks correct, the website is displayed (but incompletely).
“Collections” does not work. Choosing collections view in extras menu shows a gray area without content. The resource type setup miss the collections, there are only document, static resource, symlink and weblink.
TinyMCE does not work, both TinyMCE 4.3.4 and TinyMCE Rich Text Editor 2.0.7. The rich text input fields show the raw HTML.

All in all, it is a cruel procedure to upgrade from 2.8.x to 3.0.

= = = = =
Next step:

  • Checked some permissions for directories and files at the server. Now TinyMCE works.
  • Collections still doesn’t want to play

Last status: everything is now running as expected!

The problem with the extras was due to incorrect permissions for directories and files. When installing an extra, the directories were given a 750, the files a 626. After I set the permissions for the files to 644 via FileZilla, the extras worked.

Is there a way to basically set newly installed files to chmod 644 in MODX? In MODX 2.8.3 there was a key new_file_permissions in the system settings, which is now missing.

General: Thanks to halftrainedharry for the helpful advice.

The same setting should work in 3.0 AFAIK, tho it’s only created if you choose to set it during the setup.

Typically you’ll want the server to be configured with the proper umask so it’ll do it automatically, though.

Thanks for the quick reply! During simple upgrade there is no option to set the permission. And the server seems to do nonsense and sets new files to 626.

This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.