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
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!
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.
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.
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.
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.