Hi! I have a vexing problem. When I’m logged into WordPress, and load the About page, the Meetings tool loads correctly. However, if I log out of WordPress and reload the page, the Meetings tool no longer loads. It throws TypeError: i is undefined.
To see what would happen, I created a skeleton HTML page and added the embed code to it, along with the hs load script in the head, as follows:
VMS Meetings Widget Test
The Meetings tool loads correctly from this HTML.
I’m at a loss for the cause of this problem. In WordPress, it’s obvious that the embed script itself is probably being loaded before a dependency, but why this only happens when I’m logged out of WordPress is beyond me. The load script loads all scripts, regardless of WP login status.
Reason for this particular solution: When logged out of WordPress, the embed script kept loading before its dependency. This threw the error mentioned earlier. In an effort to preserve the embed code structure, I tried several alternative solutions. None of them worked. The solution above was a last-resort effort that still attempted to see if it would work.
Hopefully, this will help others with WordPress websites that use Hubspot Meetings or other tools.