JSON error
-
Whenever I try saving or publishing a post I cannot because I get this error: “Updating failed. Error message: The response is not a valid JSON response.”
I’ve isolated a problem and now know that it’s Stackable as I don’t get the problem unless I’m using a Stackable button.
Any ideas?
-
Hi, not sure about what’s happening. From the looks of it, during saving there might be some PHP error being triggered and is messing up the ajax save call.
Would you be able to investigate this? You can probably open up your browser’s development tools, then open up the Network tab (in Chrome/Firefox), then check out the response/contents of the error that shows up when you save. This might be able to provide some information.
I’d like to continue this in our support email so we can better help. Please reply in [email protected] 🙂
Same error for me.
“Updating failed. Error message: The response is not a valid JSON response.”
I cannot update or create any page or post.Hey @templatelia,
I did a bit of research and found a few possible solutions to this issue:
1. Head over to Settings > Permalinks, then click on Save Changes. Afterwards, check whether the saving error still occurs.
2. You may have some debugging or performance plugin or setting turned on that occasionally places in performance metrics on pages, mostly things that measure “Peak Memory Usage” or the number of “SQL Queries”. Turn those off and check whether that fixes the saving issue.
3. If you’re using SSL, you may have an incorrectly set up SSL settings or your site may be serving “mixed content” (serving both HTTPS and HTTP content). If you’re using CloudFlare, make sure you’re setting for Encryption Mode is set to “Full (Strict)” mode. And also make sure that you’re forcing all content to be served using HTTPS (this can be fixed either in your CDN settings, web hosting settings, or using an SSL plugin like Really Simple SSL https://ww.wp.xz.cn/plugins/really-simple-ssl/ )
4. Make sure that your .htaccess rules are correctly set up. Here’s what the .htaccess file normally would look like: https://www.hostinger.ph/tutorials/create-default-wordpress-htaccess-file
If none of those work, then you’ll have to check what the WordPress save call is actually returning. To do this, you’ll have to view the actual call response in your browser’s developer tools. For Chrome:
1. Right anywhere on the page, then select “Inspect” or “Inspect Element” to bring up the browser’s developer tools.
2. Navigate to the “Network” tab of the developer tools
3. Click on “XHR” in order to view only ajax calls
You should end up with something that looks like this: https://cloudup.com/ctrVfdDqNh7
Once you’re there, save your page, then check last of the newly added entries in the network tab. Check the “Headers” tab of the new entry and you should see “/wp-json/…” in the “Request URL” to indicate that it’s a rest API call. Check the “Response” tab, the contents of that should ideally start with “{…”. If not, paste here what you’re seeing.
Please let me know what happens.-
This reply was modified 6 years, 4 months ago by
Benjamin Intal.
Thanks for all this. I’ve seen #1 and #2 (deactivated the Query Monitor plugin) a couple days ago and took action on them. I haven’t actually seen the problem since doing both these things so it’s very possible that those two things were the culprit.
So it seems this is not something about Stackable, but when the problem comes up it seems to only affect posts that have Stackable items and not other posts.
@bigvibes That sounds great! If you’re not seeing the problem anymore, hopefully that did it 🙂
I’ll mark this as resolved for now. Just email if you encounter it again.
I hope you don’t mind if I post something here, even though this is showing resolved, just in case someone can use the info. I had the same JSON issue for awhile. For those using WordPress…I talked to WordPress support, since this message didn’t show up until I started using Gutenberg, or the Block Editor, and they narrowed it down to the firewall allowing some things through but not others. Their fix was to whitelist the files not coming through. No more JSON error messages. Not sure how they found those files not coming through. That is above my skillset. 🙂
-
This reply was modified 6 years, 4 months ago by
The topic ‘JSON error’ is closed to new replies.