Publishing failed. Error message: The response is not a valid JSON response
-
Hi,
Can’t make a post, all the time occurs the failure ‘Publishing failed. Error message: The response is not a valid JSON response’. I’m not a developer, so the detailed answer will be highly appreciated.
-
Add classic-editor plugin to Avoid this error
https://www.ads-software.com/plugins/classic-editor/Having the same problem with WordPress 5.3.2. Nothing would save or publish due to the “The response is not a valid JSON response” error. Not only that but in publishing a post there was no access to the slug or post categories fields.
Installing the classic editor plugin solved all issues (as well as restoring access to the slug field and categories fields).
So the question is when will WordPress issue a fix for what seems clearly to be a system bug?
The Classic Editor is not a solution if we’re trying to use WordPress out-of-the-box, which is Gutenberg-based. (For the record, I hate Gutenberg, but I know it’s going to be the only option at some point, so I’m shouldering on with it.)
In my case it’s a fresh installation of 5.3.2, which I am using to rebuild a small website from scratch. The original site works fine – the two installations are on the same server and use the same theme and plugins; the only difference I am aware of is that the new site is (naturally) in a subdirectory while I build it.
It works if Permalinks are set to Plain, but when I move it to the root directory I’ll need Permalinks.
Publishing failed. The response is not a valid JSON response.why do I always keep having this error whenever am publishing my post.hiw can i fix this error.
Just update your Permalink setting. Its work for me.
Nothing of the above suggestions worked.
When I have a post or page, I CAN save it when there is no iframe-code or button-code with an url in it.
The moment I add an iframe or something that looks like https://….. I get this error.
I have a membership site with 90 video’s on Amazon S3, so every post or page hold such code.
What can I do?
Oh, and Woocommerce is already on the latest version, so that also had a major update and I cannnot go back to WP 5.1.
Any briljant solutions?- This reply was modified 4 years, 7 months ago by hjvanessen1965.
“Just update your Permalink setting. Its work for me.”
This worked for me too, thanks a lot @taramandi
Nope, nothing mentioned in the comments worked for me (as mentioned before). Guess what? My provider has an option called “PhP Boost”. 2 hours after I ticked that option, I could save every page and post I created. On ALL (!!) of my websites. Was it the PhP Boost, was it the coffee I drank trying to relax from this husstle, was it the 2 hours rest or was it all the above I tested and all of the before mentioned? Unfortunately I will never know.
You can simply fix this error by change permalink.
Check this tutorial if unable to fix
https://areawala.com/topten/publishing-failed/sauravhny (@sauravhny)
Add classic-editor plugin to Avoid this error
https://www.ads-software.com/plugins/classic-editor/Thanks! This worked for me. I wish I understood why. Does this mean that I have to keep that plugin running now?
I got the same error message. I’m not running a live website at the moment; I’m running an Apache server on my PC using XAMPP (in my case LAMPP, being on Linux).
I fixed the error to allow Publishing of Pages, Blogposts, etc by changing my Permalinks to my favorite setting (Post Name) –>
Then copy the code in the box underneath the Save Button. These are the mod_rewrite rules and they need to go into your .htaccess file on your server –>
As I’m running my own local server, it was a case of going into the htdocs folder of the LAMPP stack software, creating a new file called .htaccess (there wasn’t one there by default). Then paste the code into the new .htaccess file, save it, and you’re good to go.
Since most of you are probably running live sites on your web hosting, you can probably do the same thing via the File Manager on your cPanel. Create or find .htaccess in your public folder where your website(s) is –>
Or you could contact your Web Hosting company and submit a support ticket asking them to enable mod_rewrite for you. –>
It’s easy enough to do yourself though, as WordPress gives you the code you need – just copy and paste it into your .htaccess file for your relevant website. (Or create the file if it’s not there already – REMEMBER to show hidden files though, in case it’s there but hidden.)
This way, you get to keep Gutenberg rather than needing to resort back to the Classic Editor.
Good luck!
This worked for me:
Updated WP to the last version.
Updated plugins.
Made sure I have the right PHP version (7.2 in my case, because 7.0, 7.1 are obsolete and 7.3 throws me some errors sometimes on shared hosting).
Went to Permalinks settings, already had Post Name there, but pressed ok anyway.
Hard refreshed the page.Modified a page adding a few keywords and it worked.
Some of the steps may not be necessary, but updating PHP and WP is the right way to maintain a site anyway.
best of luck!
- This reply was modified 4 years, 5 months ago by catalinfx.
I tried all of the above and nothing worked. WordPress was showing me the way all along. On the Permalinks page there was a message at the top of the page saying to update my .htaccess file. Down at the bottom of page it provided the mod_rewrite code I needed to put into the .htaccess file. I copied the code and pasted it at the top of my .htaccess file and voila! Like magic. Of course you will need to replace localhost with your file path to your server.
`<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /localhost/
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /localhost/index.php [L]
</IfModule>Unfortunately none of these suggestions worked for me.
I’m able to add a new page using the classic editor plugin but then the link is broken (and 404 error message is displayed). The only Permalinks option that allow me to successfully create a new page is the Plain setting. [this is using a fresh install with default theme and no plugins activated / using Let’s Encrypt certificates on manually-administrated website to enable HTTPS]In my case, I found out that my Apache setup was using .com for the “Directory” directive when my new domain name was a .app (I changed the VirtualHost TLD properly, but not the Directory).
That meant that the permalink did not work at all since the magical code as shown by sonofadoc was never seen by Apache2.
Once I fixed the TLD, everything worked like a charm.
- The topic ‘Publishing failed. Error message: The response is not a valid JSON response’ is closed to new replies.