Content failed to save, admin-ajax.php returns empty response

Hi,

Our client reported an issue where they are unable to save a certain page. The page was created earlier (the last edit was on June 27th 2018) so this used to work but now doesn’t (regression). The page contains classic Cornerstone elements.

Cornerstone shows the following error:
“Uh oh! Content failed to save”

When I inspect the network request, it returns a code 200 but the response is empty. The apache/php error logs don’t reveal anything, either (which makes sense, the server returns a code 200 response so technically, there is no error).

The console shows the following error:

Unhandled AJAX error. Expecting valid JSON from response. {readyState: 4, getResponseHeader: ƒ, getAllResponseHeaders: ƒ, setRequestHeader: ƒ, overrideMimeType: ƒ, …}abort: ƒ (a)always: ƒ ()complete: ƒ ()done: ƒ ()error: ƒ ()fail: ƒ ()getAllResponseHeaders: ƒ ()getResponseHeader: ƒ (a)overrideMimeType: ƒ (a)pipe: ƒ ()progress: ƒ ()promise: ƒ (a)readyState: 4responseJSON: nullresponseText: ""setRequestHeader: ƒ (a,b)state: ƒ ()status: 200statusCode: ƒ (a)statusText: "OK"success: ƒ ()then: ƒ ()__proto__: Object
failOver @ cs.js?ver=3.4.6:2870
i @ cs.js?ver=3.4.6:2871
e._run @ cs-vendor.js?ver=3.4.6:1937
e.run @ cs-vendor.js?ver=3.4.6:1901
f @ cs-vendor.js?ver=3.4.6:1082
(anonymous) @ cs.js?ver=3.4.6:2872
(anonymous) @ jquery.js?ver=1.12.4:2
i @ jquery.js?ver=1.12.4:2
fireWith @ jquery.js?ver=1.12.4:2
y @ jquery.js?ver=1.12.4:4
c @ jquery.js?ver=1.12.4:4
XMLHttpRequest.send (async)
(anonymous) @ VM957:1
send @ jquery.js?ver=1.12.4:4
ajax @ jquery.js?ver=1.12.4:4
submitRequest @ cs.js?ver=3.4.6:2872
(anonymous) @ cs.js?ver=3.4.6:2862
(anonymous) @ cs-vendor.js?ver=3.4.6:3681
e @ cs-vendor.js?ver=3.4.6:3681
promise @ cs.js?ver=3.4.6:2862
requestBatch @ cs.js?ver=3.4.6:2864
e._run @ cs-vendor.js?ver=3.4.6:1937
(anonymous) @ cs-vendor.js?ver=3.4.6:1927
setTimeout (async)
setTimeout @ cs-vendor.js?ver=3.4.6:1860
e.debounce @ cs-vendor.js?ver=3.4.6:1926
e.debounce @ cs-vendor.js?ver=3.4.6:1077
(anonymous) @ cs.js?ver=3.4.6:2859
(anonymous) @ cs-vendor.js?ver=3.4.6:3681
e @ cs-vendor.js?ver=3.4.6:3681
request @ cs.js?ver=3.4.6:2858
_updateRequest @ cs.js?ver=3.4.6:4
updateRecord @ cs.js?ver=3.4.6:4
(anonymous) @ cs-vendor.js?ver=3.4.6:4906
y @ cs-vendor.js?ver=3.4.6:3659
H @ cs-vendor.js?ver=3.4.6:3667
(anonymous) @ cs-vendor.js?ver=3.4.6:3671
e.invoke @ cs-vendor.js?ver=3.4.6:1878
e.flush @ cs-vendor.js?ver=3.4.6:1871
e.flush @ cs-vendor.js?ver=3.4.6:1882
e._end @ cs-vendor.js?ver=3.4.6:1936
e.end @ cs-vendor.js?ver=3.4.6:1892
e._run @ cs-vendor.js?ver=3.4.6:1937
e._join @ cs-vendor.js?ver=3.4.6:1936
e.join @ cs-vendor.js?ver=3.4.6:1903
h @ cs-vendor.js?ver=3.4.6:1082
(anonymous) @ cs-vendor.js?ver=3.4.6:2323
o @ cs-vendor.js?ver=3.4.6:994
(anonymous) @ cs-vendor.js?ver=3.4.6:2323
(anonymous) @ cs-vendor.js?ver=3.4.6:2422

Other pages seem to save just fine.

Hey Martyn,

The builder’s data is generated and save, it’s stored in the database in JSON format. Your client could have added something in the content that breaks that breaks that format and/or it could be an invalid character that your database won’t accept.

Please advise your client to add content bit by bit saving the page each time a new section or element was added. If the page fails to save the moment an element was added, please tell us what the element and what the content of the element is. If it’s text, please post the exact content in the secure note.

If the page really won’t accept any content, it could be that the invalid character passed the first save only. In this case, please inspect each text element in the page for symbols and remove them.

Thanks.

Thanks for your reply.

Our client solved (actually, more of a work-around) the issue by saving it as a new template, then using that to create a new page and save that.

Not sure why this approach should work, but it did.

I think this issue can be closed, I just wanted to update this ticket to let you know we’ve found a solution.

We are just glad that you have figured it out a way to correct the said issue.
Thanks for letting us know!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.