Opened 8 years ago
Closed 8 years ago
#1697 closed defect (bug) (fixed)
Invalid json data on WordCamp JSON API
Reported by: | miyauchi | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | WordCamp Site & Plugins | Keywords: | |
Cc: |
Description
The response of wp-json has a following line at the end of file.
<!-- Page not cached by WP Super Cache. No closing HTML tag. Check your theme. -->
Example:
https://2016.kansai.wordcamp.org/wp-json/
https://2016.kansai.wordcamp.org/wp-json/posts/
It seems that it is caused by WP Super Cache.
Thanks!
Change History (4)
#3
@
8 years ago
I sent a pull request to WP Super Cache.
https://github.com/Automattic/wp-super-cache/pull/114
#4
@
8 years ago
- Resolution set to fixed
- Status changed from new to closed
We have some custom code to make WPSC play nice with the API1,2, but some of it was disabled for troubleshooting, which caused this error.
It's fixed now, thanks for pointing it out :)
[1] - https://meta.trac.wordpress.org/browser/sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/wcorg-json-api.php#L313?rev=2898
[2] - https://meta.trac.wordpress.org/browser/sites/trunk/wordcamp.org/public_html/wp-content/wp-super-cache-plugins/rest-api.php?rev=3092
It will be fixed by adding
$wp_super_cache_debug = false;
to somewhere, but I haven't tried yet.https://github.com/Automattic/wp-super-cache/blob/3fce4ed10dd9a991197e917d2e9568c5516dd73a/wp-cache-phase2.php#L412-L422