Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude additional hubspot domain from Load JavaScript Deferred #4593

Closed
4 tasks
webtrainingwheels opened this issue Dec 16, 2021 · 1 comment · Fixed by #4621
Closed
4 tasks

Exclude additional hubspot domain from Load JavaScript Deferred #4593

webtrainingwheels opened this issue Dec 16, 2021 · 1 comment · Fixed by #4621
Assignees
Labels
3rd party compatibility Issues related to 3rd party compatibility like theme, plugin or hosting effort: [XS] < 1 day of estimated development time module: defer JS priority: low Issues that can wait type: enhancement Improvements that slightly enhance existing functionality and are fast to implement
Milestone

Comments

@webtrainingwheels
Copy link

Before submitting an issue please check that you’ve completed the following steps:

  • Made sure you’re on the latest version 👍
  • Used the search feature to ensure that the bug hasn’t been reported before 👍

Describe the bug
We have an automatic exclusion for Hubspot to resolve an error with Load JS Deferred:

The same script, shell.js can also be loaded from this other domain which should also be excluded:
js-eu1.hsforms.net

To Reproduce
Steps to reproduce the behavior:

  1. Add this script to the site:
<script charset="utf-8" type="text/javascript" src="//js-eu1.hsforms.net/forms/shell.js"></script>
<script>
  hbspt.forms.create({
	region: "eu1",
	portalId: "25164403",
	formId: "dfed4d9e-e999-4272-a287-8fabd2e0fdd7"
});
</script>
  1. Activate Load JS Deferred
  2. You will see this error: hbspt is not defined

Expected behavior
There should be no error.

Additional context
Original issue: #1378
New Ticket: https://secure.helpscout.net/conversation/1725349434/314036?folderId=377611

Backlog Grooming (for WP Media dev team use only)

  • Reproduce the problem
  • Identify the root cause
  • Scope a solution
  • Estimate the effort
@piotrbak piotrbak added 3rd party compatibility Issues related to 3rd party compatibility like theme, plugin or hosting module: defer JS priority: low Issues that can wait type: enhancement Improvements that slightly enhance existing functionality and are fast to implement labels Dec 17, 2021
@piotrbak piotrbak added this to the 3.10.6 milestone Dec 17, 2021
@Tabrisrp
Copy link
Contributor

Scope a solution ✅

In DeferJS class, add js-eu1.hsforms.net to the $exclude_defer_js array.

Estimate the effort ✅

Effort [XS]

@Tabrisrp Tabrisrp added effort: [XS] < 1 day of estimated development time and removed needs: grooming labels Dec 17, 2021
@NataliaDrause NataliaDrause self-assigned this Dec 28, 2021
NataliaDrause added a commit that referenced this issue Dec 29, 2021
This PR will fix a console error when js-eu1.hsforms.net is minified or deferred.

Fixes #4593
@piotrbak piotrbak modified the milestones: 3.10.6, 3.10.7 Jan 4, 2022
@Tabrisrp Tabrisrp mentioned this issue Jan 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3rd party compatibility Issues related to 3rd party compatibility like theme, plugin or hosting effort: [XS] < 1 day of estimated development time module: defer JS priority: low Issues that can wait type: enhancement Improvements that slightly enhance existing functionality and are fast to implement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants