• Resolved chrisjdahl

    (@chrisjdahl)


    Hi, I seem to be having a similar issue as the other user.
    My email and webhook execute successfully, but the “There was an error trying to send your message. Please try again later.” message shows up under the contact form.

    I’m sending the webhook to a my handler located on the same site as the contact form: /handlers/contact-form.php
    I’m using WP Mail Bank integrated with O365 for my mailing. But I see the error message whether “Send Email” is on or off.

    I’m on Apache/2.4.29 (Ubuntu), PHP Version 7.2, WordPress 5.4.1, Contact Form 7 Version: 2.9.8, CF7 to Webhook Version: 2.1.3
    No errors in var/log/apache2/error.log

    I have a suspicion it has to do with the response codes from my handler? Maybe some PHP.ini setting I’m missing?
    Any guidance or suggestions is appreciated!

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Mário Valney

    (@mariovalney)

    Hey. How are you?

    Are you able to provide the form url?

    No errors in var/log/apache2/error.log

    Please turn on WP_DEBUG and WP_DEBUG_LOG for debugging and check the wp-content/debug.log file.

    I have a suspicion it has to do with the response codes from my handler?

    Maybe…

    We use wp_remote_post to send the request and check for WP_Error on result.

    It’s done here.

    Thread Starter chrisjdahl

    (@chrisjdahl)

    Thanks Mario,
    I’ve sent you an email to the gmail address on your website with the login info and php handler.

    Plugin Author Mário Valney

    (@mariovalney)

    Hi!

    That’s a little out of forum guidelines.
    But… as it’s done… let’s keep going haha

    Did you turn on WP_DEBUG and WP_DEBUG_LOG for debugging? Can you provide wp-content/debug.log file?
    (in something like pasterbin, please)

    Thread Starter chrisjdahl

    (@chrisjdahl)

    Oh, sorry…
    So the only error that was in the debug log is here.
    Array to string conversion
    I got rid of the echo statement causing it.
    https://pastebin.com/SWTQZJx5
    I’ve included some of my wp-config.php. Are those ok logging settings?

    Thread Starter chrisjdahl

    (@chrisjdahl)

    Hi Mario,

    Adding the following to my handler fixed the error:

    require_once(‘../wp-blog-header.php’);
    header(“HTTP/1.1 200 OK”);
    header(“Status: 200 All rosy”);

    Wait… I spoke too soon.

    • This reply was modified 4 years, 6 months ago by chrisjdahl.
    Plugin Author Mário Valney

    (@mariovalney)

    No problem ??

    Well.. about your log, sounds like there’s something in your handler.
    It’s just a notice but can help:
    handlers/contact-form.php on line 59

    You can add “error_logs” to plugin return to check answer/exception too.

    Another point: on contact-form.php remove the (last) close tag.
    It can lead to errors.

    Thread Starter chrisjdahl

    (@chrisjdahl)

    I can’t really seem to figure this out :/ sorry. I removed the last close tag, but no luck. Also tried adding the handler page to the theme, but no luck there either. I think I’m going to just hide the output with css ?? the data / emails are going through great! So this seems to be the easiest temporary solution.
    Appreciate you trying to help out.

    Plugin Author Mário Valney

    (@mariovalney)

    It’s not a good solution… let’s try more.

    Are you able to test using this webhook?
    https://webhook.site/4a0daad2-9081-4639-bd6c-34dfb0afecf9

    We can check result here:
    https://webhook.site/#!/4a0daad2-9081-4639-bd6c-34dfb0afecf9

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Error message despite success’ is closed to new replies.