• Hello,

    I have a problem with a site where I have the Contact Form 7 plugin being used.

    When submitting the form, the page reloads instead of submitting via Ajax.

    I noticed that the /contact-form-7/includes/js/scripts.js script is not loaded.

    I am also using the Async JavaScript plugin.

    I’ve tried several ways to make it load, but only load if the user is logged in.

    I Tried:

    – Include /contact-form-7/includes/js/scripts.js in “Exclude scripts from Autoptimize”;
    – Include /contact-form-7/includes/js/scripts.js in “Script Exclusion” (Async JavaScript);
    – Include plugins / contact-form-7 / in “Exclude scripts from Autoptimize”;
    – Include plugins / contact-form-7 / in “Script Exclusion” (Async JavaScript);
    – Include a direct call with the <script> tag in the theme footer;

    Even so, it is not deleting this script and does not load Ajax correctly.

    The error started appearing after I made the following updates:
    Autoptimize version old 1.15.2 installed. Update to 1.17.1
    Async JavaScript version old 2.18.12.10 installed. Update to 2.19.07.14
    CF7 version old 5.1.3 installed. Update to 5.1.4

    Can you help me with this?

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

Viewing 11 replies - 16 through 26 (of 26 total)
  • can you detect it by console what error is there, I am unable to detect it…:)

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    ok, let’s take a step back;
    * does the form work when “optimize JS” is off?
    * does the form work when “optimize JS” is on but “aggregate JS” if off?
    * does the form work when “optimize JS” and “aggregate JS” are on but wpcf7 is added to the comma-separated JS optimization exclusion list?

    frank

    Hey, thanks for the reply,

    1) * does the form work when “optimize JS” is off?
    – Yes, it works properly but loads the page and then shows error.

    2) * does the form work when “optimize JS” is on but “aggregate JS” if off?
    – No, it doesn’t work, NO action is there after clicking submit button

    3) * does the form work when “optimize JS” and “aggregate JS” are on but wpcf7 is added to the comma-separated JS optimization exclusion list?
    – Same as 2nd point

    But strange, the submit button works fine when I have logged into the admin account.

    can you test this page
    https://atira.in/testing-2/ and tell what happens on your PC on clicking the send button.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    seems to work for me, but JS opt. is off now, right?

    Yes js option is off and it works but the page still loads/refresh after clicking submit button instead of loading preloader near button.

    You can check on this link https://atira.in/testing-2/

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    but given JS opt. is off, this is not AO’s doing?

    Don’t know this all started after enabling js option and now I have to turn it off…. But one thing is not working like on clicking submit button the whole page loads instead of loading preloader near send button

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    But one thing is not working like on clicking submit button the whole page loads instead of loading preloader near send button

    well, as JS optimization is off, it _must_ be something else, no?

    Well, don’t know what’s the reason… Could you suggest any solution.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    only advice I can give is to selectively disable and re-enable all your plugins one at a time to see in one of those causes that issue?

Viewing 11 replies - 16 through 26 (of 26 total)
  • The topic ‘Error with Contact Form 7 (reload page after submit form)’ is closed to new replies.