This is a new install and everything was working until I added extras to expand MODX capabilities.
Step to reproduce
When editing and saving a resource the save keeps looping.
I need to reload the page to escape it. Changes are saved.
Observed behaviour
In Depreciations Log
modContentType
Deprecated since v3.0 | Replace references to class modContentType with MODX\Revolution\modContentType to take advantage of PSR-4 autoloading.
Most likely, a plugin (from an extra) that runs on the event “OnDocFormSave” throws an error.
Open the browser’s developer tools and go to the “Network” tab. Then try to save a resource. A new request should appear in the list. What’s the response code? 500? Is there an error message in the response content?
If the response code is 500 but there is no error message, try to locate the server error log to see what the actual error message is. (Fatal PHP errors can’t be logged by MODX in the MODX error log.)
If you can’t find any error message, temporarily deactivate the plugins (that run on the event “OnDocFormSave”) one by one to see what plugin causes the error.
I deleted all pluging-ins, cleaned everything up; did all sorts of PHP level tests and have finally found the ‘real’ problem.
It’s a browser thing. Firefox.
Currently no saving loops if I edit in Google Chrome or Microsoft Edge.
I have the same issue with Firefox - but only on certain sites, and it doesn’t happen every time - I will use Chrome for a while and see if it happens.
If it’s a browser thing, there must be information in the browser developers’ console that can pinpoint the problem.
Next time it happens, pop open the console and make note of what’s in there. If it says something about “unexpected < character” it’s still a server-side issue, and you’ll need to inspect the AJAX responses to find the root error.