Strange MODX behaviour!

hadn’t thought if looking there - yes there is when I try and add a migx item:

XHRPOSThttps://dev.domain.com/assets/components/migx/connector.php
[HTTP/2 500 Internal Server Error 778ms]

POST
https://dev.domain.com/assets/components/migx/connector.php
Status
500
Internal Server Error
VersionHTTP/2
Transferred6.42 kB (17.37 kB size)
Referrer Policystrict-origin-when-cross-origin

accept-ranges
bytes
content-encoding
gzip
content-length
6308
content-type
text/html
date
Fri, 10 Sep 2021 09:53:53 GMT
last-modified
Sat, 02 May 2020 00:49:36 GMT
server
Apache
vary
Accept-Encoding
X-Firefox-Spdy
h2

Accept
/
Accept-Encoding
gzip, deflate, br
Accept-Language
en-GB,en;q=0.5
Connection
keep-alive
Content-Length
389
Content-Type
application/x-www-form-urlencoded; charset=UTF-8
Cookie
__utma=165511590.1764493464.1626087512.1628240651.1630394483.10; __utmz=165511590.1630394483.10.7.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided); __utmc=165511590; modx_setup_language=en; PHPSESSID=977eff97d2ef38eb4ccf2a661339b410
Host
dev.domain.com
modAuth
modx6110e607ca8822.01873836_1613a071925d628.61043512
Origin
https://dev.domain.com
Referer
https://dev.domain.com/manager/?a=resource/update&id=9
Sec-Fetch-Dest
empty
Sec-Fetch-Mode
cors
Sec-Fetch-Site
same-origin
User-Agent
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:93.0) Gecko/20100101 Firefox/93.0

X-Requested-With
	XMLHttpRequest

Uncaught TypeError: this.mask.addClass is not a function
onShow https://dev.domain.com/manager/assets/modext/modx.jsgrps-min.js:1
ExtJS 3
onAjaxException https://dev.domain.com/manager/assets/modext/core/modx.js?v=09680c04:122
ExtJS 3
f https://dev.domain.com/manager/assets/ext3/adapter/ext/ext-base.js:21
m https://dev.domain.com/manager/assets/ext3/adapter/ext/ext-base.js:21
createCallback https://dev.domain.com/manager/assets/ext3/adapter/ext/ext-base.js:21
setInterval handler*n https://dev.domain.com/manager/assets/ext3/adapter/ext/ext-base.js:21
i https://dev.domain.com/manager/assets/ext3/adapter/ext/ext-base.js:21
request https://dev.domain.com/manager/assets/ext3/adapter/ext/ext-base.js:21
ExtJS 27
loadWindow https://dev.domain.com/manager/assets/modext/modx.jsgrps-min.js:1
loadWin https://dev.domain.com/manager/?a=resource/update&id=9:834
addItem https://dev.domain.com/manager/?a=resource/update&id=9:658
ExtJS 2
modx.jsgrps-min.js:1:116212

And this is the error when versionX is installed:

XHRPOSThttps://dev.domain.com/assets/components/versionx/connector.php
[HTTP/2 500 Internal Server Error 240ms]

Uncaught TypeError: this.mask.addClass is not a function
onShow https://dev.domain.com/manager/assets/modext/modx.jsgrps-min.js:1
ExtJS 3
onAjaxException https://dev.domain.com/manager/assets/modext/core/modx.js?v=09680c04:122
ExtJS 3
f https://dev.domain.com/manager/assets/ext3/adapter/ext/ext-base.js:21
m https://dev.domain.com/manager/assets/ext3/adapter/ext/ext-base.js:21
createCallback https://dev.domain.com/manager/assets/ext3/adapter/ext/ext-base.js:21
setInterval handler*n https://dev.domain.com/manager/assets/ext3/adapter/ext/ext-base.js:21
i https://dev.domain.com/manager/assets/ext3/adapter/ext/ext-base.js:21
request https://dev.domain.com/manager/assets/ext3/adapter/ext/ext-base.js:21
ExtJS 5
Grid https://dev.domain.com/manager/assets/modext/modx.jsgrps-min.js:1
Resources https://dev.domain.com/assets/components/versionx/js/mgr/resources/grid.resources.js?v=283pl:83
ExtJS 5
each https://dev.domain.com/manager/assets/ext3/adapter/ext/ext-base.js:21
ExtJS 4
S https://dev.domain.com/manager/assets/ext3/adapter/ext/ext-base.js:21
S https://dev.domain.com/manager/assets/ext3/adapter/ext/ext-base.js:21
S https://dev.domain.com/manager/assets/ext3/adapter/ext/ext-base.js:21
ExtJS 5
each https://dev.domain.com/manager/assets/ext3/adapter/ext/ext-base.js:21
ExtJS 4
S https://dev.domain.com/manager/assets/ext3/adapter/ext/ext-base.js:21
S https://dev.domain.com/manager/assets/ext3/adapter/ext/ext-base.js:21
S https://dev.domain.com/manager/assets/ext3/adapter/ext/ext-base.js:21
ExtJS 4
addTab https://dev.domain.com/manager/assets/modext/core/modx.js?v=09680c04:445
https://dev.domain.com/manager/?a=resource/update&id=9:107
ExtJS 2
setup https://dev.domain.com/manager/assets/modext/widgets/resource/modx.panel.resource.js:128
ExtJS 2
FormPanel https://dev.domain.com/manager/assets/modext/modx.jsgrps-min.js:1
Resource https://dev.domain.com/manager/assets/modext/widgets/resource/modx.panel.resource.js:31
create ExtJS
load https://dev.domain.com/manager/assets/modext/core/modx.js?v=09680c04:85
_loadComponents https://dev.domain.com/manager/assets/modext/modx.jsgrps-min.js:1
Component https://dev.domain.com/manager/assets/modext/modx.jsgrps-min.js:1
UpdateResource https://dev.domain.com/manager/assets/modext/sections/resource/update.js:33
create ExtJS
load https://dev.domain.com/manager/assets/modext/core/modx.js?v=09680c04:85
https://dev.domain.com/manager/?a=resource/update&id=9:49
ExtJS 10
modx.jsgrps-min.js:1:116212

There seems to be a “500 Internal Server Error”. These errors aren’t logged in MODx. There should be a PHP error log somewhere on your system. The exact location depends on your server configuration.
Can you search for this log file and post the exact error message.

Hmm I only have acess to cPanel - I can’t find any error logs in there at all. Nor in the file manager.

The MIGX connector creates a JS error which leads to the further errors. Maybe some MIGX TV is configured wrong.

Maybe this post helps to locate the error log.

Thanks - I thought so - but I have taken a migx TV form a working site to make sure but it’s still a problem.

Thanks so mcuh for all this advice. So I foudn an error_log file, but it’s empty.
I will try adding the PHP you supplied - shoudl I just add that a a snippet on the same page?

I believe you should add it to the top of the connector php file. https://dev.domain.com/assets/components/migx/connector.php (for MIGX) or https://dev.domain.com/assets/components/versionx/connector.php (for VersionX).

OK thanks - I have aded it to migx - but no error is shown on screen. I just have a white screen with the ‘save, duplicate,delete,view,close,help’ buttons.

Ths is the error in developer tools:

Uncaught TypeError: this.mask.addClass is not a function
onShow https://domain.com/manager/assets/modext/modx.jsgrps-min.js:1
ExtJS 3
onAjaxException https://domain.com/manager/assets/modext/core/modx.js?v=09680c04:122
ExtJS 3
f https://domain.com/manager/assets/ext3/adapter/ext/ext-base.js:21
m https://domain.com/manager/assets/ext3/adapter/ext/ext-base.js:21
createCallback https://domain.com/manager/assets/ext3/adapter/ext/ext-base.js:21
modx.jsgrps-min.js:1:116212
onShow https://domain.com/manager/assets/modext/modx.jsgrps-min.js:1
ExtJS 3
onAjaxException https://domain.com/manager/assets/modext/core/modx.js?v=09680c04:122
ExtJS 3
f https://domain.com/manager/assets/ext3/adapter/ext/ext-base.js:21
m https://domain.com/manager/assets/ext3/adapter/ext/ext-base.js:21
createCallback https://domain.com/manager/assets/ext3/adapter/ext/ext-base.js:21

I’m not sure if this even works for AJAX-requests.
Maybe you can open the “Network”-tab of the developer tools in the browser and then click on the XHR-request that generates the error and check the response. Maybe there’s something useful in there.

hmm - thanks again!!

So in there there is a 500 error for Migx:

scheme
https
host
dev.domain.com
filename
/assets/components/migx/connector.php
Address
192.xxx.xxx.xxx:443
Status
500
Internal Server Error
VersionHTTP/2
Transferred6.42 kB (17.37 kB size)
Referrer Policystrict-origin-when-cross-origin

accept-ranges
bytes
content-encoding
gzip
content-length
6308
content-type
text/html
date
Fri, 10 Sep 2021 11:00:03 GMT
last-modified
Sat, 02 May 2020 00:49:36 GMT
server
Apache
vary
Accept-Encoding
X-Firefox-Spdy
h2

Accept
/
Accept-Encoding
gzip, deflate, br
Accept-Language
en-GB,en;q=0.5
Connection
keep-alive
Content-Length
389
Content-Type
application/x-www-form-urlencoded; charset=UTF-8
Cookie
__utma=165511590.1764493464.1626087512.1628240651.1630394483.10; __utmz=165511590.1630394483.10.7.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided); __utmc=165511590; modx_setup_language=en; PHPSESSID=977eff97d2ef38eb4ccf2a661339b410
Host
dev.domain.com
modAuth
modx6110e607ca8822.01873836_1613a071925d628.61043512
Origin
https://dev.domain.com
Referer
https://dev.domain.com/manager/?a=resource/update&id=9
Sec-Fetch-Dest
empty
Sec-Fetch-Mode
cors
Sec-Fetch-Site
same-origin
TE
trailers
User-Agent
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:93.0) Gecko/20100101 Firefox/93.0
X-Requested-With
XMLHttpRequest

Could that be a permissions issue?

I don’t think so. That shouldn’t throw a 500 error.

There is nothing that I can deduce from this response. I would need a php error message and the file/line number where the error occurs.


BTW: To post the error messages, please put lines with three back-ticks at the start and at the end of the text to format it. It’s hard to read the message the way it’s formatted now.

```//line with 3 back-ticks at the beginning
//the error message
```//line with 3 back-ticks at the end

Ah Ok - soz about that.
Hmm - ned to try and find a way to get the PHP errors then.
V annoying - I wish I could move it to my server, as it would just work.

One thing I’ve noticed - I check the server info against my own server, and my server has these differences under /?a=system/info

Working server:

Database version: 10.2.40-MariaDB Database version:
PDO drivers: mysql, sqlite
disable_functions: exec,passthru,shell_exec,system
doc_root: /home/user/dev.domain.co.uk/

Troublesome server:

Database version: 5.6.41-84.1
PDO drivers: mysql, odbc, pgsql
disable_functions: no value
doc_root: no value

I’ve only listed the settings which are different. The doc_root stood out as a potential problem? Does this point to anything?

I noticed that nearly all your server paths refer to the dev subdomain: dev.domain.com. But there are one or two references to the main domain. Is it possible that there are any cross domain issues or configuration issues related to using the wrong domain/subdomain in any of your configuration files? Have you tried re-running setup?

PS: You have revealed the actual domain name in the last post.

Thanks Andy - have changed that! :wink:
No the inconsistency of domain/sub domain was just me when hiding the real domains. All paths point to the dev sub domain.

I zipped up the site and database, installed it on another server and it works fine.

So something to do with server config but can’t work out what!

Frustrating!

When you’re on the Network tab of Dev. Tools, you can click on any line that makes an ajax call to see the request and the response. Often, there’s some messy HTML surrounding a PHP error.

BTW, have you tried putting your browser in Private or Incognito mode? When you upgrade MODX, sometimes a leftover cookie will cause weird effects in the Manager. If this solves your problem, clear your cookies for the site.

Thanks Bob. Private window didn’t help unfortunately. Had already cleared caches and cookies etc.

Couldn’t find anythin int he Network tab that would help - Unfortunately I think I hav to just persuade them to move to a host I know instead - but anoying as I prefer to fix these things rathe than run away!