Proposed Bugfix: PWA Service Worker Having HTML Inserted Into JavaScript
-
I’m currently using https://ww.wp.xz.cn/plugins/pwa/ on a site which then has
/?wp_service_worker=1being called. This is expected to be a fully JavaScript-based response, but I’m seeing the HTML code for the HubSpot tracking being inserted at the top of this response.<!-- DO NOT COPY THIS SNIPPET! Start of Page Analytics Tracking for HubSpot WordPress plugin v7.5.5--> <script type="text/javascript"> var _hsq = _hsq || []; _hsq.push(["setContentType", "standard-page"]); </script> <!-- DO NOT COPY THIS SNIPPET! End of Page Analytics Tracking for HubSpot WordPress plugin -->Is exactly what’s found its way into my
/?wp_service_worker=1response that should be JavaScript, and that’s obviously causing a syntax error.I’d love to use these two plugins together, but it appears this plugin is breaking service workers so PWA is isn’t working fully as a result (which I need it to be).
I’ll reply with an update if I happen to find a solution to this problem.
Update: I’ve found a fix! See https://ww.wp.xz.cn/support/topic/plugin-conflict-pwa-service-worker-having-html-inserted-into-javascript/#post-11742072
The topic ‘Proposed Bugfix: PWA Service Worker Having HTML Inserted Into JavaScript’ is closed to new replies.