A client pointed me to the fact that the Manager had problems. The resource tree is completely gone, the menu option on the left don’t do anything when clicked on.
When hovering on a menu item there is a ‘javascript:;’ note in the bottom left of the browser.
What could be going on here? I have had this before, but found a good solution.
When you open the developer tools in the browser, are there any related errors in the “Console” tab?
In the “Network” tab, are there requests that fail when you load the manager (or reload the resource tree)?
Are there any related errors in the MODX error log (that get added when you reload the resource tree or click a menu item?
This is normal.
These are the errors I get in the Console:
Failed to load resource: the server responded with a status of 401 ()
Uncaught ReferenceError: _ is not defined
at uploaddialog.js?mv=303pl:1435:10
Uncaught TypeError: Cannot read properties of undefined (reading ‘toLowerCase’)
at multiuploaddialog.js?mv=303pl:5:58
at multiuploaddialog.js?mv=303pl:710:3
Uncaught ReferenceError: _ is not defined
at modx.localization.js?mv=303pl:4:5
at ext-all.js:21:2529
at a (ext-all.js:21:17726)
Uncaught TypeError: Cannot read properties of undefined (reading ‘id’)
at MODx.HttpProvider.readState (modx.js?mv=f94f0bd3:1195:65)
at new MODx.HttpProvider (modx.js?mv=f94f0bd3:1050:14)
at MODx.Layout [as constructor] (modx.layout.js?mv=303pl:25:14)
at new MODx.Layout.Default (layout.js?mv=303pl:6:48)
at Object.create (ext-all.js:21:125217)
at MODx.load (modx.js?mv=f94f0bd3:86:38)
at manager/:56:38
at ext-all.js:21:2529
at a (ext-all.js:21:17726)
Failed to load resource: the server responded with a status of 404 ()
401 would normally suggest a permissions issue with accessing that file.
404 may suggest that particular file is not present.
I’d start by checking these two items in the Network tab of DevTools.
You should be able to see what resource / file the browser is trying to load for each error.
Your other errors may well stem from those two.
Let us know what you find.
What version of MODX / PHP do you have there?
These are some of the interesting errors:
/connectors/modx.config.js.php?action=&wctx=mgr&HTTP_MODAUTH=modx6564a771e48f63.70129116_165b3f81bac9100.40989659
/connectors/lang.js.php?ctx=mgr&topic=topmenu,file,resource,welcome,configcheck,dashboards,moregallery:default,gallery:default,ace:default&action=
/connectors/modx.config.js.php?action=&wctx=mgr&HTTP_MODAUTH=modx6564a771e48f63.70129116_165b3f81bac9100.40989659
What I don’t understand is that nothing has changed on the website. This just happened overnight.
Version is 3.0.3, PHP 8.2.
This are just the urls of the connectors , which is normal, but what are the responses of this requests?
On which manager page are you seeing this?
Has the PHP version changed eventually?
It’s on the Dashboard. PHP is 8.2.
These URL’s give a NS_ERROR_FAILURE.
Your first error above suggests a problem with the MODX lexicon.
BTW, when you watch the network in Dev. Tools, you can click on a URL and then on the response tab. In a case like yours, calls to a processor through a connector may show a PHP error embedded in some HTML.
Wait, what. I logged in today and the Manager is working fine? What is going on.
The problem occurred in several browsers, for weeks. How did it just disappear? This feels pretty unreliable.
could it be, there was something errorness in the MODX cache?
Have you added any extras, or enabled any plugins since it was working?
No I did nothing at all. Which makes it really strange.
That sometimes means your host did something, like changing the PHP version, modifying the server config, or adding some new mod_security rules. Have you tried disabling all plugins, then manually deleting all files in the core/cache directory?
The host did nothing.
I did empty the cache several times (FTP). Except for disabling the add-ons, because they could not be reached from the menu.
You can disable the plugins in the DB’s modx_site_plugins
table.
The resource tree is very sensitive to errors in the parent
field because they can prevent the Resource tree from being built in the first place. For example, a resource with a non-existent parent or two resources that are each others’ parents. SiteCheck will check for that, but you can also check the DB yourself. (The current version of SiteCheck has trouble with PHP 8.)
Another thing to double–check is the processor path in the core/config/config.inc.php
file.
The problem is back today
What do you mean with the parent field? If that is a problem then it would happen all the time I guess? This problem occurs every now and then. Not only on this site, but I’ve experienced it in the past on other MODX sites as well.
Besides the resource tree (and Elements and Files) that are invisible, the left menu is also not working.
The processor path looks like this:
/var/www/vhosts/domain.nl/httpdocs/core/src/Revolution/Processors/
Are you definitely always accessing the manager from exactly the same URL? It’s possible that if you access it on the non www. version of the domain sometimes and on the www. other times then you might get this sort of problem. Sorry if this sounds basic but it’s happened to me in the past.
You’re correct that a problem with the parent
field would not cause an intermittent problem. Your processors path being wrong would also cause trouble all the time.
I looks like Mark Hamstra may have helped solve this in another thread. If not, I’d definitely try disabling all plugins in the DB.