Contact Form 7
[resolved] sends email but returns error (8 posts)

  1. rickharris3
    Posted 2 years ago #

    I am getting "Unexpected token S" in the error.message below:

    error: function(xhr, status, error, $form) {
    var e = $('<div class="ajax-error"></div>').text(error.message);


  2. buzztone
    Posted 2 years ago #

    This is most likely due to a Javascript conflict with either your current WordPress theme or one of the other plugins you are using - see Solving CF7 Javascript Conflicts.

  3. rickharris3
    Posted 2 years ago #

    I tested it with the standard 2013 WordPress theme and the only plugins used were Easy WP SMTP and Really Simple CAPTCHA, which were required for my contact form.

  4. buzztone
    Posted 2 years ago #

    Include a link to your CF7 form if possible.

  5. rickharris3
    Posted 2 years ago #

    Thanks, but I already switched to using the Fast Secure Contact Form, which appears to work just fine.

  6. buzztone
    Posted 2 years ago #

    If Fast Secure Contact Form uses no Javascript that could resolve a Javascript conflict.

    Remember that a problem in one script can cause issues in another. For example, some jQuery errors can stop jQuery processing any more script, which can make the culprit hard to find. A jQuery error in one of your plugins or your themes javascript files can stop jQuery processing before it gets to the CF7 script.

    If this resolves your question, it helps others contributing here, if you can flag your post as [resolved]

  7. rickharris3
    Posted 2 years ago #

    Understood, and thanks for the help. I spent about an hour debugging the CF7 code and it seems more like a server side problem than a client problem, since the data gets sent to the server and an the error I mentioned above gets returned back to the client. Unfortunately, since I could not get CF7 to work with all other plugins deactivated and with the standard Twenty Thirteen them that comes with WP, then I simply had to abandon using it.

  8. natewerewolf
    Posted 2 years ago #

    Hi, I know you switch to other solution. But for those who might come across this problem, it can simply because you activate the 'debug option' in Easy SMTP.

    So if that is set, the server return some extra information like
    Server .... (start with 'S')
    before the actual json
    {"message":"Your message has been sent successfully"}

    And the js cannot parse the response in this case. That's why there is no message display. So remember to switch off the debug option

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Contact Form 7
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.