• Resolved demenyzo

    (@demenyzo)


    Hi.

    The CF7 form after submit the form is not giving successful message, the loading icon rolling forever… but the message was sent, and it was recorded in the Google Sheet!

    If I disable your plugin, it works again. I’ve tried with older version of CF7, but no luck!

    Could you help me?

    • This topic was modified 4 years, 5 months ago by demenyzo.

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

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author moshensky

    (@moshensky)

    Hello @demenyzo
    I tried to send email on your website. Everything works well for me, probably because you disabled the plugin. Could you please do a small investigation:

    1) Open the page with form and press F12. Find “network” tab and open it.
    2) Do your email form request (as usual)
    3) You should see new request in that tab with address like: https://YOUR_WEBSITE/wp-json/contact-form-7/v1/contact-forms/44/feedback, click on it
    4) Click on subtab “preview” or “response” and send me please the text (if it contains any sensitive data – please hide it by asterisks ********.

    Thanks.
    PS: sorry for long response, don’t know is it still matter to you?

    Thread Starter demenyzo

    (@demenyzo)

    Hi. Thanks for your respond. I actived your plugin again.
    I dont see any contact form request. ??

    If you could check that would be awesome!

    Thread Starter demenyzo

    (@demenyzo)

    here is the code:

    “<br />
    <b>Notice</b>: Undefined index: _date in <b>*****/wp-content/plugins/cf7-spreadsheets/CF7-spreadsheets.php</b> on line <b>692</b><br />
    <br />
    <b>Notice</b>: Undefined index: _time in <b>*****/wp-content/plugins/cf7-spreadsheets/CF7-spreadsheets.php</b> on line <b>692</b><br />
    {“into”:”#wpcf7-f11476-p11350-o1″,”status”:”mail_sent”,”message”:”Sikeresen elk\u00fcldted az imat\u00e9ma-h\u00e1laad\u00e1sodat”,”posted_data_hash”:”2616dc0cc4bf70dbcba192df7e63cf9c”}”

    Thread Starter demenyzo

    (@demenyzo)

    It turned out, the server sends this response to the client after form submission:

    “<br />
    <b>Notice</b>: Undefined index: _date in <b>*****/wp-content/plugins/cf7-spreadsheets/CF7-spreadsheets.php</b> on line <b>692</b><br />
    <br />
    <b>Notice</b>: Undefined index: _time in <b>*****/wp-content/plugins/cf7-spreadsheets/CF7-spreadsheets.php</b> on line <b>692</b><br />
    {“into”:”#wpcf7-f11476-p11350-o1″,”status”:”mail_sent”,”message”:”Sikeresen elk\u00fcldted az imat\u00e9ma-h\u00e1laad\u00e1sodat”,”posted_data_hash”:”2616dc0cc4bf70dbcba192df7e63cf9c”}”

    Here’s the relevant client side code (see my comments):

    $.ajax({
    type: ‘POST’,
    url: wpcf7.apiSettings.getRoute(‘/contact-forms/’ + wpcf7.getId($form) + ‘/feedback’),
    data: formData,
    dataType: ‘json’,
    processData: !1,
    contentType: !1
    }).done(function(data, status, xhr) {
    ajaxSuccess(data, status, xhr, $form);
    $(‘.ajax-loader’, $form).removeClass(‘is-active’)
    }).fail(function(xhr, status, error) {

    // this callback gets executed because of a parser error
    // the client expects JSON, but the response starts with the char ‘<‘

    var $e = $(‘<div class=”ajax-error”></div>’).text(error.message);
    $form.after($e)
    })

    Plugin Author moshensky

    (@moshensky)

    Have you tried to use default CF7 button to send this request?

    Does your request have this fields (you can check in browser debugger F12 => network):

    _wpcf7: 44
    _wpcf7_version: 5.2.2
    _wpcf7_locale: en_US
    _wpcf7_unit_tag: wpcf7-f44-p26-o2
    _wpcf7_container_post: 26
    _wpcf7_posted_data_hash: 
    _wpcf7_recaptcha_response: 'xxxxxxxx'
    Thread Starter demenyzo

    (@demenyzo)

    Hi. My friend just fixed the issue!
    Only 1 character was missing

    Plugin Author moshensky

    (@moshensky)

    Was it trouble in your code, or something wrong with plugin? (for second option I’ll be happy if you contribute this on github)

    It turned out, the server sends this response to the client after form submission:

    “<br />
    <b>Notice</b>: Undefined index: _date in <b>*****/wp-content/plugins/cf7-spreadsheets/CF7-spreadsheets.php</b> on line <b>692</b><br />
    <br />
    <b>Notice</b>: Undefined index: _time in <b>*****/wp-content/plugins/cf7-spreadsheets/CF7-spreadsheets.php</b> on line <b>692</b><br />
    {“into”:”#wpcf7-f11476-p11350-o1″,”status”:”mail_sent”,”message”:”Sikeresen elk\u00fcldted az imat\u00e9ma-h\u00e1laad\u00e1sodat”,”posted_data_hash”:”2616dc0cc4bf70dbcba192df7e63cf9c”}”

    Here’s the relevant client side code (see my comments):

    $.ajax({
    type: ‘POST’,
    url: wpcf7.apiSettings.getRoute(‘/contact-forms/’ + wpcf7.getId($form) + ‘/feedback’),
    data: formData,
    dataType: ‘json’,
    processData: !1,
    contentType: !1
    }).done(function(data, status, xhr) {
    ajaxSuccess(data, status, xhr, $form);
    $(‘.ajax-loader’, $form).removeClass(‘is-active’)
    }).fail(function(xhr, status, error) {

    // this callback gets executed because of a parser error
    // the client expects JSON, but the response starts with the char ‘<‘

    var $e = $(‘<div class=”ajax-error”></div>’).text(error.message);
    $form.after($e)
    })

    I think it’s more of a workaround than a fix ??
    My only focus was to get rid of the warning message the server produces.

    I’ve added a ‘@’ to the 692th line:
    if (!empty(@$request_data[$clear_tag]) || '0' ...

    link to that line:
    https://github.com/moshenskyDV/CF7-spreadsheets/blob/master/CF7-spreadsheets/CF7-spreadsheets.php#L692

    • This reply was modified 4 years, 1 month ago by marazmarci.
    Plugin Author moshensky

    (@moshensky)

    Fixed in v 2.3.1
    Thanks for the issue.
    Also thanks @marazmarci your workaround helped me a lot.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘CF7 not giving successful message or thank you page’ is closed to new replies.