Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Publishing or uploading failed. Error message: "The response is not a valid JSON response"

Tags:

wordpress

Today I got an issue in WordPress. When I try to create a new page and uploading a new image in the WordPress admin section, I try to find out the solution, but I didn't get it... So after sanding an hour I got a solution...

Error

"Publishing failed. Error message: The response is not a valid JSON response."

like image 623
Rawan-25 Avatar asked Nov 23 '19 16:11

Rawan-25


3 Answers

Go to settings>permalinks. Select "Post name" and save.

Try updating your posts/pages. If it doesnot work, try selecting another option in the settings>permalinks.

like image 76
Tashi Avatar answered Sep 17 '22 11:09

Tashi


Right now, you can use the Classic Editor plugin for fixing this issue.

The answer for the error is the editor I didn't know, but there is a new editor issue. If you are getting the same issue, then please use the below plugin. For fixing these issues, I'm doing R&D on this issue. If I get an exit solution, then will I make an update soon...

like image 37
Rawan-25 Avatar answered Sep 19 '22 11:09

Rawan-25


Changing the permalink settings as mentioned previously fixed the problem for me. If you keep "Post name" as the permalink setting, then the .htaccess file needs to be writable by wordpress.

Alternatively the below can be pasted at the bottom of .htaccess file. Mod_rewrite changes are executed from the bottom of the file first.

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
</IfModule>
like image 30
CdeoEm Avatar answered Sep 19 '22 11:09

CdeoEm