JavaScript error when Events Manager event is draft
-
G’day,
Using Events Manager, with an event created by another user and saved as a draft, I get a JavaScript error — analyticsFileTypes is not defined. This breaks other script on the page.
It happens because
is_preview()is true, so the GA script block isn’t loaded, but external-tracking.min.js is still loaded and executes, generating the error.To fix, I wrapped the code within the ready handler function in a test:
// only if GA script block has been loaded if (typeof analyticsFileTypes != "undefined") { ... }I’d appreciate it if you could add this to your next release.
cheers,
Ross
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘JavaScript error when Events Manager event is draft’ is closed to new replies.