• Resolved yay123

    (@yay123)


    First thanks for all the effort and time spent developing the plugin, we’re truly enjoying it!

    One issue, we seem to see in the new release, with the “delay JS” feature is that turning on that feature causes the below errors in the console. When I turn off that setting, the console errors disappear. I’ve tried excluding files, but no matter what I exclude as long as the “delay JS” feature is on, I still see these errors.

    To reproduce I believe you simply need to install a wp-forms on a site and turn on the “delay JS” feature in WP optimize. I have another site I’m working on with this setup (where “delay JS” is currently enabled), and the console errors are consistently causing the form to not be submitted on this new site. 🙁

    These errors may be preventing form submission (it seems inconsistent) so I’ve turned off delay JS for now on mauievs.com until we can resolve this. Let me know if you have any questions, and thanks again!

    jquery.min.js:2 jQuery.Deferred exception: wpforms_settings is not defined ReferenceError: wpforms_settings is not defined
    at Object.loadValidation (https://mauievs.com/wp-content/plugins/wpforms-lite/assets/js/frontend/wpforms.min.js:5:916)
    at HTMLDocument.ready (https://mauievs.com/wp-content/plugins/wpforms-lite/assets/js/frontend/wpforms.min.js:1:280)
    at e (https://mauievs.com/wp-includes/js/jquery/jquery.min.js:2:27028)
    at t (https://mauievs.com/wp-includes/js/jquery/jquery.min.js:2:27330) undefined
    ce.Deferred.exceptionHook @ jquery.min.js:2
    t @ jquery.min.js:2
    setTimeout
    (anonymous) @ jquery.min.js:2
    c @ jquery.min.js:2
    add @ jquery.min.js:2
    (anonymous) @ jquery.min.js:2
    Deferred @ jquery.min.js:2
    then @ jquery.min.js:2
    ce.fn.ready @ jquery.min.js:2
    ce.fn.init @ jquery.min.js:2
    ce @ jquery.min.js:2
    init @ wpforms.min.js:1
    (anonymous) @ wpforms.min.js:5Understand this warning
    jquery.min.js:2 Uncaught ReferenceError: wpforms_settings is not defined
    at Object.loadValidation (wpforms.min.js:5:916)
    at HTMLDocument.ready (wpforms.min.js:1:280)
    at e (jquery.min.js:2:27028)
    at t (jquery.min.js:2:27330)

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Damilare

    (@deabiodun)

    Hi @yay123!

    Thanks for the kind words about our plugin despite the Delay JS feature breaking your WPForms submissions.

    That feature works by delaying loading of JavaScript files until there is an interaction on a page (e.g. scrolling, mouse movement etc.). Of course, that won’t work in situations where certain parts of a page requires a delayed script to be already present which seems to be the case with WP Forms.

    Therefore, excluding WP Forms JavaScript files from being delayed as you’ve done is the way to go. If this is not working, it is possible that you’re not excluding all the related scripts.

    Please check if you have merging of JavaScript files enabled. Disable it if so. Save your changes and clear your cache before testing.

    If the issue persists, then you might have to leave the delay feature turned off.

    Kind regards.

    Thread Starter yay123

    (@yay123)

    Thanks for the message @deabiodun and thanks again for your work on this project!

    I’ve tried excluding a bunch of variations from the Delay including the below in the Delay JS exclusion section, but the wp-form console errors persist. I don’t believe there’s any way to exclude certain pages where I know the wp-forms are running, so I’ll likely just turn off the feature for now. I’ve also made sure to disable merging (and all other features besides delay JS), and cleared the cache. It seems like the Delay JS and wp-forms just don’t play well with each other. Let me know if I’m missing anything or if there’s something else I should try.

    /wp-content/plugins/wpforms-lite/assets/*
    /wp-includes/js/jquery/jquery.min.js
    wpforms_settings

    Thanks again for the reply, I hope you have a great day!

    Plugin Support Damilare

    (@deabiodun)

    Hi!

    As you’ve said, the delay JS feature does not work with WP Forms. Disabling it is the only option here.
    Feel free to get in touch if you have any other concerns.

    Regards.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Version 4.1.1 Delay JS Causes WP Forms console errors’ is closed to new replies.