Blank white page with JSON when saving

Permalink 1 user found helpful
This is in 5.7.5.6, I've had this happen before, but never repeatedly. After editing blocks on a page, when I click save, it says:

{"message":null,"title":null,"time":"2016-07-18 09:41:46","redirectURL":"http:\/\/alaskaairmuseum.dev\/explore","pages":[{"name":null,"cID":null}]}

If I click back, the page reflects the changes I made, but why the error? What causes this as I've seen it before, only this time it won't stop, I've cleared cache, but everytime I save this page the page goes blank white with json output.

ob7dev
 
ob7dev replied on at Permalink Reply
ob7dev
Removing a javascript error in the theme fixed it. Still curious what causes this though, any one know the inner workings of this?
mohammedfaqruddin replied on at Permalink Reply
mohammedfaqruddin
Hi ob7dev,

I checked the console but my theme has no errors.
mnakalay replied on at Permalink Reply
mnakalay
I have that too. Happens on 5.7.5.6 but not consistently. It will often save normally and then all of a sudden give the white page with json on. Like you said, it still gets saved.

I have no error in my console except a 404 for a missing css file
JohntheFish replied on at Permalink Best Answer Reply
JohntheFish
I think that may be related to a bug in 5.7 that failed to detect edit mode correctly during ajax request. @olsgreen provided a fix for v8. It may also have been fixed in 5.7.5.10.
BHWW replied on at Permalink Reply
BHWW
Hi John

I'm getting this error in 5.7.5.13

Any idea what the fix that was applied in 5.8 was? and if it could be implemented in 5.7?

Ben
JohntheFish replied on at Permalink Reply
JohntheFish
https://github.com/concrete5/concrete5/pull/4523
BHWW replied on at Permalink Reply
BHWW
Thanks John, however those changes appear to have been made in 5.7.5.13 :( so it's onto something else then.
drbiskit replied on at Permalink Reply
drbiskit
I had the same issue. It was being caused by 'Google Tag Manager' tracking code. I had to disable the code while in edit mode and it has fixed the issue.

<?php $c = Page::getCurrentPage(); if (!$c->isEditMode()) {
$this->inc('elements/tracking-codes.php');
} ?>

It has meant that I've had to hard code rather than use the Dashboard -> Systems & settings -> SEO & Statistics -> Tracking Codes - Not ideal, but not the end of the world.
willabc replied on at Permalink Reply
Had this issue specifically with the stucco theme. Their main.js file located at theme_stucco/themes/stucco/js/main.js tries to use a special character "#" without escaping it first.

$("a[href*=#]:not([href=#])") needs to be changed to $("a[href*=\\#]:not([href=\\#])")

Seems to be breaking jquery which subsequently breaks the ajax required for editing.

Hope that is helpful for anyone else running into that issue on that particular theme.