Hustle Pro doesn't submit form

I’ve setup the exit intent on Hustle Pro so when the user is trying to leave the site the form pops up but the form on it isn’t getting submitted.

  • Kasia Swiderska
    • Support nomad

    Hello hafid good ,

    I’m sorry that our plugin is not working correctly on your site.

    I have escalated this to our Second Line Support Developers team and they will be checking this conflict with theme installed on your site and our plugin and what needs to be done to fix it.

    They will update this ticket as soon as they will have results.

    kind regards,

    Kasia

  • Kostas
    • CTO

    Hi hafid good ,

    This issue isn’t originating from Hustle but I’ll have to explain some things so please bear with me.

    First of all your theme isn’t using the proper way to enqueue it’s scripts and style but instead adds them as “hardcoded” in the source code of the template files. This can bee seen for example at themeskatiewinterbournefront-page.php

    <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.bundle.min.js" integrity="sha384-zDnhMsjVZfS3hiP7oCBRmfjkQC4fzxVxFhBx8Hkz2aZX8gEvA/jsP3eXRCvzTofP" crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/ScrollMagic/2.0.6/ScrollMagic.min.js"></script>
    <script src="<?php bloginfo('template_url'); ?>/dist/js/main.js"></script>

    The theme should instead be using the wp_enqueue_style() and wp_enqueue_script() functions instead so they are properly registered within the WP system.

    Now apart from that the theme authors chose to add a different jQuery version that what WP Core has, and that’s see on the code mentioned above as well which is jquery-3.3.1.slim.min.js. WordPress is using a patched version of 1.12.4 instead.

    The problem here is the “slim” version of jQuery. Slim versions don’t include all functionalities and one of them is Ajax that is needed from Hustle ( and other plugins as well ) to communicate with the back-end when a submission happens to work properly.

    The theme authors should either use the non-slim version of jQuery or find a way to not “overwrite” the default WordPress functionalities as well.

    Unfortunately since we can’t know how the theme uses it’s files in total and what is actually needed from jQuery this is something that you have to explain to the theme authors instead so they can take a look and adjust their code accordingly.

    Tell me if you need any more help or clarifications with this.

    Regards,

    Konstantinos