WordPress’s Gutenberg Editor Errors when including slashes

If you’re getting the dreaded

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

and all the standard responses to solve this issue don’t work, then perhaps check your code for slashes and code like below. Seems somehow to be getting caught in WordPress’s checks. I have been able to replicate examples where including code like the following, causes wordpress not to save the content. Seems to be a bug.

require_once(__DIR__ . '/../vendor/autoload.php');
$dotenv = Dotenv\Dotenv::createImmutable(__DIR__.'/../');
$dotenv->load();

Cannot seem to save the above code to this post here:
https://buildio.dev/using-wordpress-with-composer-and-env-file/

Not related to permalinks. Can save the above Post by removing slashes.

0 0 votes
Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments

0
Would love your thoughts, please comment.x
()
x