Changes between Initial Version and Version 1 of Ticket #31577, comment 3
- Timestamp:
- 03/10/2015 02:20:33 AM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #31577, comment 3
initial v1 2 2 > I believe what needs to happen is `Content-type: application/json` needs to be returned, correct? If you are using the corresponding PHP API (`wp_send_json_success()/_error()`), then you should always have this content type set. 3 3 4 Logically, yes. However, this was happening toa client when they were trying to add an image to a post, even after I had disabled all plugins. Perhaps there might be a deeper root cause, but I found that the attached fix was sufficient for this scenario.4 Logically, yes. However, this was affecting a client when they were trying to add an image to a post, even after I had disabled all plugins. Perhaps there might be a deeper root cause, but I found that the attached fix was sufficient for this scenario. 5 5 6 6 Given that the function in question only deals with JSON responses I figured it would be a good idea to get this in place, that way even if something goes wrong higher up the chain there is still a chance to recover from it. Otherwise I would like to spare a less experienced developer a painful multi-hour bug hunt.