WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Contact Form 7] Ajax: all works, except for send (38 posts)

  1. Peter Holme
    Member
    Posted 4 years ago #

    Hi! I have a small problem: On a site I run, when a user has correctly filled out the form and push "send", the "spinning arrows" that appear does not go away.. Even though the email is sent! Everything else AJAX works just fine (if a mandatory field is not filled out, there is an AJAX error message, etc). The form is located at http://statsviterforeningen.no/bli-medlem/

    http://wordpress.org/extend/plugins/contact-form-7/

  2. Theiceman6
    Member
    Posted 4 years ago #

    Same problem but mine isn't sending the email :(

  3. Theiceman6
    Member
    Posted 4 years ago #

    Anyone ??

  4. Peter Holme
    Member
    Posted 4 years ago #

    well I haven't heard anything either.. so please feel free to share any thoughts on this :)

  5. vteixeira
    Member
    Posted 4 years ago #

    I have the same problem on a site I'm building right now.

    I disabled all plugins - no javascript problems.

    I'm on wordpress 3.0RC2, PHP 5.2.3

  6. kellye
    Member
    Posted 4 years ago #

    CF7 on my test site (not live yet) was working beautifully for weeks... now, endless spinning beach ball. Sometimes sends, sometimes doesn't. No plugin issues. Hope to hear something.

  7. Theiceman6
    Member
    Posted 4 years ago #

    is there any Alternative ??

  8. Peter Holme
    Member
    Posted 4 years ago #

    well I just run the form without ajax... it works, but it ain't as pretty :( (and it's harder to see what errors you might have done when filling out the form)

  9. Theiceman6
    Member
    Posted 4 years ago #

    HOW ? DID U DO THAT ?

  10. kellye
    Member
    Posted 4 years ago #

    Well, tried backing up to the previous version, 2.2, but that didn't work. Still spins endlessly. (It appears that for me, the form is always sending in spite of the spinning arrows—it's just that some were ending up in my spam filter before.)

  11. Peter Holme
    Member
    Posted 4 years ago #

    Well, Iceman, it says how in the docs ;) To disable ajax, just add the following lines to your wp-config.php:
    define ('WPCF7_LOAD_JS', false);

    But: this isn't what I want! I want ajax to work :) When you use this solution, it is harder for the user to see if some fields are filled out incorrectly, or if the message has been sent.

  12. Joss Cowan
    Member
    Posted 4 years ago #

    I too have the same problem, endless spinning arrow ball on clicking send. Out of desperation I have now tried deleting Contact form 7 and using other mcontact forms first I tried Zero configuration, I got the following message when clicking send

    "Parse error: syntax error, unexpected '"' in /home/cleaalb1/public_html/wp-includes/class-phpmailer.php on line 1385"

    Something very similar if not the same happened when I tried using Tiny mail. It seems there may be a bigger problem as none of the forms I tried will work, have no other active plug-ins, only CAPTCHA installed but it is deactiveated.

    I would very much appreciate any advice!

  13. kellye
    Member
    Posted 4 years ago #

    So I finally gave in, and in wp-contact-form-7.php

    I set the WPCF7_LOAD_JS to false.

    The form works now, BUT... from the user's standpoint, exclusive checkboxes no longer act as exclusive (it does only send me one response, but the form seems to choose which response it will send to me), and I'm sure other js goodies are missing.

    As peterhol says, it's very distressing to be without the js when they're part of what makes the plugin so good!

    Since everybody seems to have looked for plugin conflicts in this thread and we aren't having any, any possibility this is a WP issue? I'm using 2.9.2. Searched around the forums to see if there are any reports of strangeness with js and 2.9.2 but I don't see any.

    I really want to get this fixed the right way and I don't want to give up on CF7 to do it.

  14. kellye
    Member
    Posted 4 years ago #

    Oh. My. Gosh.

    As a last resort... too unhappy to leave the js like that... I set it back to true then went through my notes of everything that's been changed over the last couple of weeks.

    We changed this:
    Thanks for your interest! Your message was sent successfully. We will get back to you within two business days.

    To this to sound more friendly:
    Thanks for your interest! Your message was sent successfully. We'll get back to you within two business days.

    When I took out the apostrophe and reverted from "we'll" to "we will," the CF7, miraculously, now works. JavaScript and all.

    If anyone else dared to write a contraction in their "sent" message, go back and give this a try.

  15. Peter Holme
    Member
    Posted 4 years ago #

    Glad it worked for you.. unfortunately, it didn't for me :( don't have any 's in my messages

  16. bencarter78
    Member
    Posted 4 years ago #

    This is a major issue!!! I'm having the same problem. The arrows keeps spinning and NOTHING happens. The form gets sent (in fact I get between 3-11 copies of the email! No idea why!)

    Can anyone help to resolve this issue? Please?!

    It has been working fine and then this. I've tried deactivating all of the other plugins but this still happens.

    If there is no fix can someone suggest a plugin which can do the same job?

    Cheers!

  17. hansjuh
    Member
    Posted 4 years ago #

    I got this problem too. I think it's something with one of the latest releases of Contact form 7 =(

  18. jaymus
    Member
    Posted 4 years ago #

    Same here. Redirect was working fine with WP 2.9.2 and now on 3.0 i just get a spinning arrow.

  19. reven
    Member
    Posted 4 years ago #

    Hi. Same problem here. I have no redirection, it's just the ajax that doesn't work: loading wheel keeps on spinning but message is sent.

    Checking the Console on firebug I get the following response on sending the form:

    <br />
    <b>Warning</b>:  stripslashes() expects parameter 1 to be string, array given in <b>.....(redacted)..../wp-content/plugins/contact-form-7/includes/classes.php</b> on line <b>276</b><br />
    {"mailSent":true,"into":"#wpcf7-f1-p452-o1","captcha":null,"message":"Tu mensaje se ha enviado con \u00e9xito. Muchas Gracias.","onSentOk":null}

    I suppose this is not what the script is waiting for. But I'm not sure how to tackle.

  20. reven
    Member
    Posted 4 years ago #

    Ok, found something, but it's just a quick hack. I'm sure someone can find a more elegant solution. In contact-form-7/includes/classes.php on line 276 there's the following:

    $query_string .= $key . '=' . urlencode( stripslashes($data ) ) . '&';

    I just added the following before that line:

    $my-data-proxy = $data;

    And then changed $data to "$my-data-proxy" in said line. Works like a charm. I suppose there's some type of problem with the type of the variable been passed, but as I said, someone more versed in php can work out something more elegant.

  21. wjrutgers
    Member
    Posted 4 years ago #

    I have the same problem! Arrow keeps on spinning and message gets sent over and over again when clicking the button.

    @ reven: i tried your hack but then my whole website crashed...I probably did something wrong. Not much into .php myself :) Got it back up again though.

    Hopefully there will be an update available soon. Otherwise I will try a different plugin, any suggestions?

  22. Peter Holme
    Member
    Posted 4 years ago #

    Perfect! Worked, the reason wjrutgers' site went down is probably because of the variable name ($my-data-proxy) - it won't work. Use $mydataproxy instead. So, line 276 in includes/classes.php goes from

    $query_string .= $key . '=' . urlencode( stripslashes( $data ) ) . '&';

    to

    $mydataproxy = $data;
    $query_string .= $key . '=' . urlencode( stripslashes( $mydataproxy ) ) . '&';

    Thanks, reven!

  23. dumbmie
    Member
    Posted 4 years ago #

    I'm having the same issue too. But I tried

    $mydataproxy = $data;
    $query_string .= $key . '=' . urlencode( stripslashes( $mydataproxy ) ) . '&';

    it didn't work. Do I have to change any variables above for it to work? I'm not sure if I did it correctly. All I did was pasting
    $mydataproxy = $data
    on top of
    $query_string .= $key . '=' . urlencode( stripslashes( $mydataproxy ) ) . '&';

  24. Peter Holme
    Member
    Posted 4 years ago #

    Here.. this is what works for me. Just upload this document to the correct directory and rename it from classes.txt to classes.php..

    http://holme.se/wp-content/plugins/contact-form-7/includes/classes.txt

    If it still doesn't work, you may have another problem..

  25. dumbmie
    Member
    Posted 4 years ago #

    Too bad didn't work for me. Thx anyway

  26. ruslany
    Member
    Posted 4 years ago #

    I have the same problem after I upgraded to WP 3.0. It seems to me this is related to the version of the jquery used. When WP used jquery v1.3.2 this bug did not happen. As soon as I change the jquery version to 1.4.2 (used by default in WP 3.0) the contact form stops working.

  27. dumbmie
    Member
    Posted 4 years ago #

    Okay, whoever that has issue using the CF7 please vote it as broken at
    http://wordpress.org/extend/plugins/contact-form-7/changelog/

  28. svedman
    Member
    Posted 4 years ago #

    @ruslany, thank you!

    Replacing jQuery 1.4.2 with 1.3.2 fixed the problem in WP3.0 for me. Now I'm just waiting for an update of CF7 to work with jQuery 1.4.2.

  29. dumbmie
    Member
    Posted 4 years ago #

    ruslany thanks alot! It works nicely after degrading the jQuery.

  30. thommo
    Member
    Posted 4 years ago #

    Thanks heaps kellye!

    Changing my success message from "Thanks! We'll get the report to you within 24hrs" to "Thanks! We will get the report to you within 24hrs" worked!

    Apostrophes are powerful things!!!! :-)

    Brilliant!

Topic Closed

This topic has been closed to new replies.

About this Topic