Breaking Template Output with Google Site Kit 1.7
-
Greetings! This message is for the plugin authors and maintainers.
I am a lead developer working on Google Site Kit.
As of our latest release (1.7), we started receiving reports of users’ sites appearing broken on the front end when logged in. After some investigation, I found that this was due to full-template output buffering being ended prematurely in the document’s
<head>
.This is due to the
\WPEL_Front::action_rest_api_init
method callingob_end_clean
.We recently added REST request preloading into Site Kit and so this causes the
rest_api_init
action to be fired in a normal request cycle. WordPress core does this as well in the context of the editor so it’s not safe to assume that this action is only invoked in the context of serving a REST request.I found that simply removing this method fixed the problem, but I am not sure if that is the correct solution for this plugin. I am happy to help if needed. The repo doesn’t seem to be public or I would have already submitted a PR ??
- The topic ‘Breaking Template Output with Google Site Kit 1.7’ is closed to new replies.