jetpack icon indicating copy to clipboard operation
jetpack copied to clipboard

HTML Comment in the WC REST API JSON output

Open kilbot opened this issue 8 years ago • 3 comments

WP Super Cache seems to be appending an HTML comment to the WC REST API JSON output, this causes invalid syntax errors.

kilbot avatar Jun 15 '17 05:06 kilbot

What queries are you sending where you're seeing the HTML comments? The wp_cache_add_to_buffer() function checks if "<html" is found in the content of the request. If it's not found, then it doesn't add a comment, but instead dumps them to the DEBUG log instead.

donnchawp avatar Jun 15 '17 11:06 donnchawp

Hi @donnchawp, I didn't see the actual comment, I just received an invalid syntax report and when I suggested deactivating WP Super Cache the problem was resolved. I will activate Super Cache on my dev server and give you some more information tomorrow.

kilbot avatar Jun 15 '17 12:06 kilbot

Bump! Did you track down what the requests were? Can you try the development code here as it has better support for the JSON api.

donnchawp avatar Jul 06 '17 16:07 donnchawp

Closing this for now because of the lack of activity on this. We can always reopen in the future if needed.

jeherve avatar Aug 15 '22 08:08 jeherve