Archived topic
"Updating failed. The response is not a valid JSON response." using scripts
5 replies · Started by Ryan on August 5, 2020
I'm using generatepress + generateblocks to build a site and whenever I use certain scripts in custom html blocks I get a "Updating failed. The response is not a valid JSON response." error that prevents me from saving/updating the page.
<div id="mni-membership-637269831464728009"></div><script src="https://eastcountychamber.chambermaster.com/Content/Script/Member.js" type="text/javascript"></script><script type="text/javascript">new MNI.Widgets.Member("mni-membership-637269831464728009",{member:53713,styleTemplate:"#@id{text-align:left;position:relative}#@id .mn-widget-member-name{font-weight:700}#@id .mn-widget-member-logo{max-width:100%}"}).create();</script>
code like this from my local chamber of commerce...
Now, this code works perfectly fine in another WordPress install just using Gutenberg blocks by itself and in other builders like Divi.
I've also tried disabling every plugin except GP premium and generate blocks and the problem still persists.
Hi there,
i tested your code using a HTML Block within and without using GenerateBlocks and it seems to work fine.
There are quite a few reported issues of that error on wp.org just recently. A lot of users found its permalink related. Try hitting the Save button a couple of times in Settings > Permalinks and setting it to a plain format.
Changing the permalinks does not seem to resolve the issue. Was there any other reasons for this error?
Can you check if there are any issues displayed in Dashboard > Tools > Site Health.
No issues under site health other than to many themes and a lack of SSL.
You may need to check security plugin or server security settings ( your host should be able to assist here ) - as they may be blocking JS inside the post content.