-
- 416 Posts
I don't know when this started, but I found on one of my sites, that the modx error log is full of this error message.
[2018-09-27 11:27:00] (ERROR @ /var/www/html/modx/core/xpdo/xpdo.class.php : 2414) PHP warning: json_encode() [<a href='function.json-encode'>function.json-encode</a>]: recursion detected
I've tracked it down to saving a chunk in the manager, any chunk no matter the content. It doesn't happen with any other type of resources. It doesn't matter if I make any changes to the chunk. Each time a chunk is opened, 35+ errors are generated.
I though perhaps some plugin that activates on closing a resource my be the culprit. I disabled Version X which would make a copy of the chunk when closing, but this had no affect.
I searched the forums for this, but any references to this were from 7-8 years ago when when saving resources resulted in an infinite saving loop. TinyMCE was considered the cause.
Any thoughts on how to track this down?
Modx: 2.6.5
PHP: 5.3.3
SQL: 5.1.73
This is a private server managed by the client IT department.
-
- 24,544 Posts
I would first try repairing all tables in PhpMyAdmin.
You could also watch the network tab in Chrome or Firefox (Ctrl-shift-i), to see if that shows anything.
A problem with a plugin attached to OnChunkFormSave could do that, but it seems unlikely that you have one.
A mismatch in the date/time settings can cause trouble with saving chunks.
The only time I know of that json_encode would be called for chunks would be in the case of a chunk with something in its 'properties' field, but that would be unlikely to affect all chunks.
-
- 416 Posts
Thanks Bob
The IT folks say the database and date/time stamps check out.
Any other ideas?
-
- 24,544 Posts
Did the network tab show anything useful? You can click on each line with a request to connectors/index.php and see the Header and Response. Sometimes the response will have a PHP error, embedded in some confusing HTML code. The data at the end of the Header may provide a clue to which processor is being called via the connector.
-
- 416 Posts
The headers look fine. All of them show status of 200. When I click on them, I see no errors. I'll send the info to you privately to be sure I'm looking at the right thing.
Also I just discovered that the errors are not generated when saving a chunk, just when closing one (whether I save it first or not).
-
- 24,544 Posts
Sorry, I'm baffled. I've never seen this before. Maybe the server error logs would help.
-
- 416 Posts
Thanks Bob.
I'll see what they say.
-
- 416 Posts
Well, they see nothing out of the ordinary in the server logs. Hmmm.....
Perhaps I can try disabling plugins and snippets one at a time, maybe it'll surface.
-
- 24,544 Posts
Another thought: Take a look at the chunk table (modx_site_htmlsnippets) in PhpMyAdmin. Look at the 'properties' fields for all chunks to see if any chunk has something there.
-
- 416 Posts
The properties field all contain:
a:0:{}
Except there are couple that contain NULL