WordPress.org

Making WordPress.org

Opened 2 years ago

Closed 2 years ago

#1697 closed defect (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)

#1 @miyauchi
2 years ago

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

#2 @ocean90
2 years ago

  • Component changed from General to wordcamp.org

#4 @iandunn
2 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

Note: See TracTickets for help on using tickets.