Strange MODX behaviour!

Hi all,

I have installed modx on an external server, and all was fine, but when I logged in today - something very strange happens.
If I try and edit a resource, chunk, TV - ANYTHING - I get a flash of the element on the screen, but then it goes white - leaving just the butons top right (Save, Delete, Duplicate, Close, Help!).

If I click ANY of those buttons, the resource/chunk/TV etc is restored, and I can carry on editing - any ideas what could be causing this strange behaviour?

Running the latest version of MODX (2.8.3)
PHP version: 7.4

Thanks!
Andy

Just found the issue - it was the plugin called ‘VersionX’. I disabled all plugins, and re-activated one by one. Shame because I use that extra regularly - but for some reason it doesn’t like my installation!

1 Like

Hi @tm2000 ,

Would you be able to see if there’s anything related in the MODX / PHP error logs when the plugin is enabled?
If there’s a 500 error it should show what’s going wrong there.

Thanks - This is the error i get in the logs when the plugin is activated:

[2021-09-10 04:24:17] (ERROR in xPDO::getService @ /home1/username/domain.com/core/xpdo/xpdo.class.php : 1235) modRestClient::__construct is deprecated since version 2.3.0. Use the modRest classes instead.
[2021-09-10 04:24:17] (ERROR in modRestCurlClient::__construct @ /home1/username/domain.com/core/model/modx/rest/modrestcurlclient.class.php : 26) modRestClient::__construct is deprecated since version 2.3.0. Use the modRest classes instead.
[2021-09-10 04:24:17] (ERROR in xPDO::getService @ /home1/username/domain.com/core/xpdo/xpdo.class.php : 1235) modRestClient::__construct is deprecated since version 2.3.0. Use the modRest classes instead.
[2021-09-10 04:24:17] (ERROR in modRestCurlClient::__construct @ /home1/username/domain.com/core/model/modx/rest/modrestcurlclient.class.php : 26) modRestClient::__construct is deprecated since version 2.3.0. Use the modRest classes instead.
[2021-09-10 04:24:18] (ERROR in xPDO::getService @ /home1/username/domain.com/core/xpdo/xpdo.class.php : 1235) modRestClient::__construct is deprecated since version 2.3.0. Use the modRest classes instead.
[2021-09-10 04:24:18] (ERROR in modRestCurlClient::__construct @ /home1/username/domain.com/core/model/modx/rest/modrestcurlclient.class.php : 26) modRestClient::__construct is deprecated since version 2.3.0. Use the modRest classes instead.

But further to this issue, Migx isn’t working - if I create a Migx TV, and try to populate it in the resource, I get a blank screen again. Everything else seems to be working fine.

Very strange!!!

I have just reinstalled versionX and it’s still throwing the blank screen, but no errors in the error log

Could it be a permissions issues maybe?

Are there any errors in the console of the developer tools of your browser?

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?