Marketing Integrations

KZeni
Participant

Proposed Bugfix for WordPress Plugin: PWA Service Worker Having HTML Inserted Into JavaScript

SOLVE

This is a cross-post of https://wordpress.org/support/topic/plugin-conflict-pwa-service-worker-having-html-inserted-into-jav... since I wanted to share/discuss this wherever people might be looking.

 

The official HubSpot plugin for WordPress (https://wordpress.org/plugins/leadin/) has a bug which is breaking the official PWA plugin for WordPress (https://wordpress.org/plugins/pwa/) and potentially other plugins. This is being caused by the fact that the HubSpot plugin is outputting code via hooks that don't expect any direct output (even then, it's CSS & JS instead of HTML).

 

Simply changing what this plugin is hooking into to be more fitting given WordPress' conventions fixes the issue (outputs the tracking code HTML just before </body> on the public & login pages using `login_footer` and `wp_footer` instead of `login_enqueue_scripts` and `wp_enqueue_scripts`, respectively).

1 Accepted solution
KZeni
Solution
Participant

Proposed Bugfix for WordPress Plugin: PWA Service Worker Having HTML Inserted Into JavaScript

SOLVE

Okay, it looks like the newly released 7.6.0 version of the plugin has resolved this issue.

 

Thanks!

View solution in original post

3 Replies 3
sharonlicari
Community Manager
Community Manager

Proposed Bugfix for WordPress Plugin: PWA Service Worker Having HTML Inserted Into JavaScript

SOLVE

Hey @KZeni 

 

Thank you for sharing this information 🙂 

 

Sharon 


Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !




KZeni
Participant

Proposed Bugfix for WordPress Plugin: PWA Service Worker Having HTML Inserted Into JavaScript

SOLVE

I'd be curious to know the status of this being adopted as part of an official plugin update.

 

I've patched of the plugin on my site, but I don't want it to break by updating to a new release of this plugin that doesn't include the fix. Also, this really should be fixed for others using this plugin as well.

0 Upvotes
KZeni
Solution
Participant

Proposed Bugfix for WordPress Plugin: PWA Service Worker Having HTML Inserted Into JavaScript

SOLVE

Okay, it looks like the newly released 7.6.0 version of the plugin has resolved this issue.

 

Thanks!