Upgrade to 3.0 failed with multiple problems

This seems to be a problem with the extra Tickets.

If you use Tickets, then here is a possible fix (completely untested though):

$tmp = $this->map->offsetGet('MODX\Revolution\modUser');
$tmp['composites']['AuthorProfile'] = array(
	'class' => 'TicketAuthor',
	'local' => 'id',
	'foreign' => 'id',
	'cardinality' => 'one',
	'owner' => 'local',
);
$this->map->offsetSet('MODX\Revolution\modUser', $tmp);

Do you know enough about PHP 8 to summarize or theorize about why it seems to break so many things compared to PHP 7? What does it do differently?

The issue above is not a problem with PHP 8. The problem is that the extra Tickets hasn’t been adapted to work with MODX 3. It didn’t work with PHP 7. PHP 8 probably just shows more warnings/notices.

That does seem to clear the errors. Hopefully it works everywhere else.

I’m experiencing issues 2 and 4 as well on multiple sites when upgrades from 2 to MODX 3:
Empty manager tree (menu not opening as well, and renders ‘javascript:;’) and Package manager not loading.

Sites using both PHP 7.4 or 8.

Try @halftrainedharry’s submitted pull request

Can anyone help with the blank manager tree? I have it in almost every site that has been upgraded tot MODX 3. Pretty annoying for my customers.

Did you try the patch to the GetList.php file listed in @halftrainedharry 's pull request?

If you didn’t understand it, find this file:

core/src/Revolution/Processors/Workspace/Packages/GetList.php

Then on line 218 replace:

$updates = ['count' => count($updates)];

with:

$updates = is_array($updates) ? ['count' => count($updates)] : ['count' => 0] ;

If that doesn’t fix the resource tree, then do you have any error messages popping up in the Error Log when trying to load the tree?

No that doesn’t help sorry. I thought that solution concerned the Package Installer. The Installers are working fine now after updating the extra’s through SiteDash.

But the resource trees on many sites remain blank. Links in the left menu also do not work; they render a ‘Javascript;:’.

There are a lot of errors from the Manager in the console:

Deze pagina gebruikt de niet-standaard property ‘zoom’. Overweeg het gebruik van calc() in de relevante propertywaarden of gebruik ‘transform’ samen met ‘transform-origin: 0 0’. manager
Laden voor het met bron ‘https://example.com/connectors/lang.js.php?ctx=mgr&topic=topmenu,file,resource,welcome,configcheck,dashboards,gallery:default,quickstartbuttons:dashboard&action=’ is mislukt. manager:17:1
Laden voor het met bron ‘https://example.com/connectors/modx.config.js.php?action=&wctx=mgr&HTTP_MODAUTH=modx634d778897cc34.71890313_1634e67f3e270e6.41181736’ is mislukt. manager:18:1
Uncaught ReferenceError: _ is not defined
https://example.com/manager/assets/modext/util/uploaddialog.js?mv=301pl:1435
uploaddialog.js:1435:3
Uncaught TypeError: MODx.config.upload_files is undefined
https://example.com/manager/assets/modext/util/multiuploaddialog.js?mv=301pl:5
https://example.com/manager/assets/modext/util/multiuploaddialog.js?mv=301pl:710
multiuploaddialog.js:5:30
unreachable code after return statement
modx.tree.js:872:12
Uncaught ReferenceError: _ is not defined
https://example.com/manager/assets/modext/core/modx.localization.js?mv=301pl:5
ExtJS 2
modx.localization.js:5:9
Uncaught TypeError: MODx.user is undefined
readState https://example.com/manager/assets/modext/core/modx.js?mv=ff590c28:1195
HttpProvider https://example.com/manager/assets/modext/core/modx.js?mv=ff590c28:1050
Layout https://example.com/manager/assets/modext/core/modx.layout.js?mv=301pl:25
Default https://example.com/manager/templates/default/js/layout.js?mv=301pl:6
create ExtJS
load https://example.com/manager/assets/modext/core/modx.js?mv=ff590c28:86
https://example.com/manager/:56
ExtJS 2
modx.js:1195:9
Uncaught ReferenceError: _ is not defined
Welcome https://example.com/manager/assets/modext/widgets/modx.panel.welcome.js?mv=301pl:21
create ExtJS
load https://example.com/manager/assets/modext/core/modx.js?mv=ff590c28:86
_loadComponents https://example.com/manager/assets/modext/core/modx.component.js?mv=301pl:68
Component https://example.com/manager/assets/modext/core/modx.component.js?mv=301pl:10
Welcome https://example.com/manager/assets/modext/sections/welcome.js?mv=301pl:17
create ExtJS
load https://example.com/manager/assets/modext/core/modx.js?mv=ff590c28:86
https://example.com/manager/:75
ExtJS 2
modx.panel.welcome.js:21:17
Deze pagina gebruikt de niet-standaard property ‘zoom’. Overweeg het gebruik van calc() in de relevante propertywaarden of gebruik ‘transform’ samen met ‘transform-origin: 0 0’. hulp-nodig
‘src’-attribuut van -element is leeg. hulp-nodig:17:1

This is the error log’s messages:

[2022-10-18 11:04:04] (ERROR @ /var/www/vhosts/example.com/httpdocs/core/components/sitedashclient/src/System/Status.php : 137) PHP warning: is_file(): open_basedir restriction in effect. File(/proc/meminfo) is not within the allowed path(s): (/var/www/vhosts/example.com/:/tmp/)
[2022-10-18 11:04:04] (ERROR @ /var/www/vhosts/example.com/httpdocs/core/components/sitedashclient/src/System/Status.php : 57) PHP warning: is_file(): open_basedir restriction in effect. File(/proc/stat) is not within the allowed path(s): (/var/www/vhosts/example.com/:/tmp/)
[2022-10-18 11:04:04] (ERROR @ /var/www/vhosts/example.com/httpdocs/core/components/sitedashclient/src/System/Status.php : 73) PHP warning: is_file(): open_basedir restriction in effect. File(/proc/cpuinfo) is not within the allowed path(s): (/var/www/vhosts/example.com/:/tmp/)
[2022-10-18 11:09:03] (ERROR @ /var/www/vhosts/example.com/httpdocs/core/components/sitedashclient/src/System/Status.php : 137) PHP warning: is_file(): open_basedir restriction in effect. File(/proc/meminfo) is not within the allowed path(s): (/var/www/vhosts/example.com/:/tmp/)
[2022-10-18 11:09:03] (ERROR @ /var/www/vhosts/example.com/httpdocs/core/components/sitedashclient/src/System/Status.php : 57) PHP warning: is_file(): open_basedir restriction in effect. File(/proc/stat) is not within the allowed path(s): (/var/www/vhosts/example.com/:/tmp/)
[2022-10-18 11:09:03] (ERROR @ /var/www/vhosts/example.com/httpdocs/core/components/sitedashclient/src/System/Status.php : 73) PHP warning: is_file(): open_basedir restriction in effect. File(/proc/cpuinfo) is not within the allowed path(s): (/var/www/vhosts/example.com/:/tmp/)

These messages are mere warnings from the SiteDashClient extra. I doubt this causes a blank manager.


That’s correct. It only concerns the package manager.


Assuming one of the installed extras causes the blank resource tree.

  • Is there an extra that is only installed on your sites that don’t work and not on your sites that do work?
  • If you temporarily disable all the plugins, does that solve the issue? If yes, which plugin causes the problem?
  • Does the system setting extension_packages contain something? Does it solve the issue if you temporarily set this setting to empty?

I cannot find an extra that is exclusively connected to these sites with a problem.
I disables all packages through the database, but without any effort.

extension_packages is empty in the dabatase (I cannot go into the Settings since the menu’s don’t work).

My guess it’s a Javascript problem: the menu’s are not clickable and there are no sub menu’s. It says ‘Javascript:;’ when you hover your move over them.

Does it work if you go directly to https://yourdomain.com/manager/?a=system/settings&ns=core?
Is it only the manager start page https://yourdomain.com/manager/ that fails?


When you call this connector directly in a new browser tab, what is the response?

https://yourdomain.com/connectors/lang.js.php?ctx=mgr&topic=topmenu,file,resource,welcome,configcheck,dashboards,gallery:default,quickstartbuttons:dashboard&action=

Does it change anything if you remove some of the topics in the topic parameter?

manager/?a=system/settings&ns=core renders a blank page (within the Manager).
Don’t know about other pages, because I cannot access them through the menu.

connectors/lang.js.php?ctx=mgr&topic=topmenu,file,resource,welcome,configcheck,dashboards,gallery:default,quickstartbuttons:dashboard&action=

Tried several, but all give a completely white browser tab.

This connector only initializes MODX and then loads some language strings. The fact that this doesn’t work means that an error happens when MODX is initialized. (So it’s not a Javascript problem. Most errors in the browser console are just subsequent errors because the data from this request is missing.)

Do you have access to the PHP error log on your server? Are there any related errors in there? (Note this is not the MODX error log in core/cache/logs.)


How did you disable them? In the database table modx_site_plugins → column “disabled”? Did you clear the cache (folder core/cache/) afterwards?

In MODX 3 code from extras can also be loaded from a bootstrap.php file in core/components/name_of_the_extra/. Maybe try temporarily renaming such files to test if they cause the issue.

I disabled them in the modx_transport_packages table, not modx_site_plugins:open_mouth: (yes, cache cleared).

Didn’t work though :frowning:

This is the PHP error log of site1:

mod_fcgid: stderr: PHP Fatal error: Uncaught Error: Class modConnectorRequest not found in /var/www/vhosts/dezandbloem.nl/httpdocs/core/src/Revolution/modX.php:1514, referer: https://mydomain.com/manager/

mod_fcgid: stderr: PHP Fatal error: Uncaught Error: Class modConnectorRequest not found in /var/www/vhosts/dezandbloem.nl/httpdocs/core/src/Revolution/modX.php:1514, referer: https://mydomain.com/manager/

So this line seems to be the problem:
PHP Fatal error: Uncaught Error: Class modConnectorRequest not found in /var/www/vhosts/yourdomain.com/httpdocs/core/src/Revolution/modX.php:1514

Does the file core/src/Revolution/modConnectorRequest.php exist? Is the content correct?

Is there a system setting modConnectorRequest.class or modRequest.class? If yes, what is the value?

One other site has the same fatal errors.

modConnectorRequest.php does exist and the content seems intact (compared it to a healthy site).

I cannot find an entry key modConnectorRequest.class or modRequest.class in the modx_system_settings table.

According to your error message, MODX tries to load the class modConnectorRequest. But in MODX 3 the value should be MODX\Revolution\modConnectorRequest (with the namespace MODX\Revolution).

The value gets set in this line:

Either to the value of the system setting modConnectorRequest.class (if it exists) or to MODX\Revolution\modConnectorRequest::class (which is MODX\Revolution\modConnectorRequest).


So if you don’t have a system setting, why is the value wrong?
Does it work if you (temporarily) change the line to a hard-coded value:

$connectorRequestClass = "MODX\Revolution\modConnectorRequest";