最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

editor - Intermittant problem saving posts

programmeradmin4浏览0评论

I'm being faced very often when I typically go into a saved draft, edit a post and then save it. I'm getting the error:

Updating failed. The response is not a valid JSON response.

I'm finding that I can often publish, but if I continue to save as a draft, I may or may not get what I was expecting. I'm seeing titles disappear and other pieces of content. I have reached out to Wordpress and was told to change the 'permalinks' settings and then change back again. This did not work. I was also told to roll back to classic editor, which seems to work, but I want to continue using blocks. How can I resolve this issue without having to downgrade wordpress for our writers?

As was suggested here is the debug below

Exception { name: "NS_ERROR_FAILURE", message: "", result: 2147500037, filename: "…ormer-quantum-scientist-she-is-now-a-full-time-artist/embed/", lineNumber: 8, columnNumber: 0, data: null, stack: "l@/:8:385\n@/:8:1110\n@/:8:1788\n" }

I'm being faced very often when I typically go into a saved draft, edit a post and then save it. I'm getting the error:

Updating failed. The response is not a valid JSON response.

I'm finding that I can often publish, but if I continue to save as a draft, I may or may not get what I was expecting. I'm seeing titles disappear and other pieces of content. I have reached out to Wordpress and was told to change the 'permalinks' settings and then change back again. This did not work. I was also told to roll back to classic editor, which seems to work, but I want to continue using blocks. How can I resolve this issue without having to downgrade wordpress for our writers?

As was suggested here is the debug below

Exception { name: "NS_ERROR_FAILURE", message: "", result: 2147500037, filename: "https://example/libby-heaney-bridges-the-gap-be…ormer-quantum-scientist-she-is-now-a-full-time-artist/embed/", lineNumber: 8, columnNumber: 0, data: null, stack: "l@https://example/libby-heaney-bridges-the-gap-between-science-and-art-a-former-quantum-scientist-she-is-now-a-full-time-artist/embed/:8:385\n@https://example/libby-heaney-bridges-the-gap-between-science-and-art-a-former-quantum-scientist-she-is-now-a-full-time-artist/embed/:8:1110\n@https://example/libby-heaney-bridges-the-gap-between-science-and-art-a-former-quantum-scientist-she-is-now-a-full-time-artist/embed/:8:1788\n" }
Share Improve this question edited Oct 18, 2020 at 11:26 disruptive asked Oct 12, 2020 at 7:39 disruptivedisruptive 512 bronze badges 7
  • I've run into this problem before, and usually for me the problem was that something--often the plugin I was working on--was printing extra information out. This will create invalid JSON. Check to make sure there's not extra whitespace after your closing ?>, etc. – Pat J Commented Oct 12, 2020 at 16:26
  • It would be useful to reproduce the error with your browser's debug tools open, so that you can see the error response from the server. If it's a 500 error then check your server's error logs (or separate PHP error logs if you have them) for details, although nowadays that ought to be emailed to you too. However if you reported this to WordPress then I assume they already asked you for those specifics, i.e. what exactly the non-JSON content is? Can you post them here too? – Rup Commented Oct 15, 2020 at 11:28
  • Hmm, that looks like valid JSON to me, except for the 'Exception' at the beginning if that's being returned by the server too. But this is a server error, and an unhelpful one (2147500037 is the generic Windows E_FAIL). What is NS_ here - your server? What's going to be generating this error? Most of the search results are for VirtualBox. Are there any more diagnostics in your server logs? – Rup Commented Oct 18, 2020 at 11:49
  • @Rup, I'm running this on bluehost with their WP instances. – disruptive Commented Oct 18, 2020 at 16:01
  • OK, I think you’ll have to send them the error then and ask them about it. – Rup Commented Oct 18, 2020 at 16:02
 |  Show 2 more comments

2 Answers 2

Reset to default 1

I don't know if this is the cause of your problem but I had the same problem. I solved it by deleting all the "echo" and "print" I added to debug.

Search for all echo commands and remove them, even not so obvious ones like _e() and all other functions which output html, like the_title(), there is a bunch of them.

发布评论

评论列表(0)

  1. 暂无评论