Title: JSON error when adding a file
Last modified: January 9, 2022

---

# JSON error when adding a file

 *  [tcmacadmind](https://wordpress.org/support/users/tcmacadmind/)
 * (@tcmacadmind)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/json-error-when-adding-a-file/)
 * Hi, every time I insert a file into an event/page/post an error occurs when I
   try to save the event. The error reads Updating Failed. The response is not a
   valid JSON response. I am inserting a PDF file and using the File block. This
   has worked for me in the past and allows people to download the file (which is
   a poster for an event) to their computer. I use this all the time and it only
   started showing this error recently.
 * The problem was first noticed when inserting PDF files into an event but upon
   further investigation the error occurs across all of the site in pages, posts
   and events.
 * I have tried deactivating all of my plugins but that did not fix the issue. I
   also installed the Classic Editor and that worked but I don’t like using the 
   old Classic style and would prefer to use the Block style.I was advised to try
   flushing my permalinks and clearing your cache/history but the error still occurs?
 * Can you please investigate and advise me how to fix the problem.
 * Thanks for your help
    Dave
    -  This topic was modified 4 years, 5 months ago by [Yui](https://wordpress.org/support/users/fierevere/).
      Reason: moved to fixing wordpress

Viewing 1 replies (of 1 total)

 *  [Vijay Hardaha](https://wordpress.org/support/users/vijayhardaha/)
 * (@vijayhardaha)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/json-error-when-adding-a-file/#post-15232114)
 * You’re getting php errors in response due to the JSON response is not valid, 
   You need to check the DEBUG constants settings and also check for the response
   in the network tab in development tools in your browser.

Viewing 1 replies (of 1 total)

The topic ‘JSON error when adding a file’ is closed to new replies.

## Tags

 * [JSON error](https://wordpress.org/support/topic-tag/json-error/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Vijay Hardaha](https://wordpress.org/support/users/vijayhardaha/)
 * Last activity: [4 years, 5 months ago](https://wordpress.org/support/topic/json-error-when-adding-a-file/#post-15232114)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
