Viewing 15 replies - 1 through 15 (of 23 total)
  • I am having the same problem (and am also on 3.5.2 and WP 3.6.1). There is no feedback to the person completing the form, the little arrows just keep spinning. We are also using the Easy WP SMTP plugin ver 1.0.4. When I deactivate that plugin, this problem goes away. However, we need to use SMTP.

    As per the Forum Welcome, please post your own topic.

    Thread Starter slabadie

    (@slabadie)

    I am using WP-Mail-SMTP. I deactivated it and CF7 still doesn’t work.

    Thread Starter slabadie

    (@slabadie)

    I re-activated WP-Mail-SMTP and the mail is sent but the arrows keep spinning and no confirmation displayed.

    Thread Starter slabadie

    (@slabadie)

    I have now deactived WP-Mail-SMTP and installed Easy WP SMTP and the same thing happens. I get the email but the arrows continue to spin and no confirmation message.

    I’m dealing with the same issue at the moment myself. It’s likely a jQuery conflict with another plugin/theme. However, even though I’ve reverted to a default theme (I’ve tried 2012 and 2013) and deactivated all other plugins, I’m still having the same issue. My current work around is to eliminate the spinner (for now) by adding this to wp-config.php:

    define ('WPCF7_LOAD_JS', false);

    I’m devoting the weekend to solving this issue, as I’ve yet to find a definitive answer.

    Thread Starter slabadie

    (@slabadie)

    I copied your code to disable the spinner, but it still spins.

    Did you do a hard refresh on the page before resending? If you’ve already loaded the page, you’ll need to refresh it first since this statement will remove some javascript from your rendered page.

    You shouldn’t see this in the view source of your page once you’ve made the change and refreshed the page:

    <script type='text/javascript'>
    /* <![CDATA[ */
    var _wpcf7 = {"loaderUrl":"http:\/\/example.com\/wp-content\/plugins\/contact-form-7\/images\/ajax-loader.gif","sending":"Sending ...","cached":"1"};
    /* ]]> */
    </script>
    <script type='text/javascript' src='https://example.com/wp-content/plugins/contact-form-7/includes/js/scripts.js?ver=3.5.2'></script>
    Thread Starter slabadie

    (@slabadie)

    Yes I did a hard refresh and the code is showing when you view source.

    And this

    define ('WPCF7_LOAD_JS', false);

    is in your wp-config.php?

    If so, you might check as wp-config.php can be located in one of two places. Top level of your WordPress install and one directory above that.

    I put it right above the “happy blogging line”

    .
    .
    .
    /**
    * Contact Form 7 JavaScript causing issues with jQuery and form submission
    */
    define ('WPCF7_LOAD_JS', false);
    
    /* That's all, stop editing! Happy blogging. */
    .
    .
    .

    I have found the root cause of the problem (in my case). I simply eliminate the cause of the problem instead of fixing the plugin, as I’m hoping that the plugin author is reading he can update the plugin to deal with what caused the issue.

    View source on your page and make sure there is absolutely nothing after the closing html tag.

    This is what was causing my problem (the very end of my html output):

    </html><!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->

    Apparently this the commented after the closing html tag is being appended to the JSON response, causing an error, which in turn causes the spinner to never quit spinning (actually, the element css style for visibility is never updated to “hidden”). In my case, we had moved to another server, and the contents of wp-content/advanced-cache.php (from WP Super Cache) was causing this extra output. I simply uninstalled WP Super Cache, which eliminated the extraneous output to my page.

    So check if there’s any extra output after your closing html tag. You can also use Firebug to see the XHR response.

    Update: It appears to me that it’s not specifically due to the extra content after the closing html tag, but something to do with WP Super Cache using the PHP fucntion register_shutdown_function() to call wpcache_broken_message() in advanced-cache.php. (which in the end, does add extra content after the closing html tag)

    This is definitely an edge case and may or may not be the cause of your problem. All I can say is that it was in my case.

    If this doesn’t remedy your situation, I can recommend you try one of a few things.

    1) See what the error message is (if the spinner won’t go away, then the response had an error).

    In wp-content/plugins/contact-form-7/includes/js/scripts.js, try changing:

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

    }

    to

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

    }

    If you get an error like: “JSON.parse: unexpected non-whitespace character after JSON data”

    then use Firebug (or similar) to take a peek at the response from the Ajax call.

    In my case, I saw:

    {“mailSent”:true,”into”:”#wpcf7-f1994-p1944-o1″,”captcha”:null,”message”:”Your message was sent successfully. Thanks.”}<!– WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! –>

    which made it obvious that there was extra characters after the JSON.

    I’ve found WP Super Cache to be the culprit. In my case I had a misconfigured WP Super Cache plugin appending an html comment to the end of the JSON data, causing the JSON to be invalid, hence breaking the Ajax and never stopping the spinner.

    I created a new thread on the WP Super Cache plugin forum:

    wpcache_broken_message on xhr (Ajax) causing issue with Contact Form 7

    As a final note to the OP (as this may not be the solution for your situation), make sure all your plugins and theme(s) are using the WP provided jQuery. Deactivate all the plugins other than Contact Form 7 and try a default theme like 2012 or 2013 and see if that fixes your problem. If so, there is more than likely a plugin/theme jQuery conflict.

    Thread Starter slabadie

    (@slabadie)

    Hey Doug, I had define (‘WPCF7_LOAD_JS’, false); at the very bottom of the config file and moved it the same spot that you placed it and now all of the forms are working.

Viewing 15 replies - 1 through 15 (of 23 total)
  • The topic ‘CF7 Not Working After Upgrade’ is closed to new replies.