• Resolved ajproline

    (@ajproline)


    I’ve seen this across several different websites now.

    When CF7 to webhook is enabled, the form fails when submitted. It takes a while to process, then fails. However, the webhook is being submitted.

    This doesn’t happen when using a webhook from Zapier, only when using a webhook from our own service (https://proline.app)

    I believe that CF7 to webhook might just not be waiting long enough for the response, and failing due to a lack of a response.

    Is it possible to increase the amount of time the form waits for a response? Or else is is possible to have the form ignore responses and errors and show a success as long as there was no error on the site it’s installed on?

    Another strange thing: If I’m inspecting the page with the Chrome developer console, the form submission works. If the the developer console is closed (as it normally would be), it fails. Very confusing.

    • This topic was modified 1 year, 5 months ago by ajproline.

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

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

    (@mariovalney)

    Hi!

    I believe that CF7 to webhook might just not be waiting long enough for the response, and failing due to a lack of a response. Is it possible to increase the amount of time the form waits for a response?

    It’s possible. We use wp_remote_post so you can change the default value for timeout with the ctz_post_request_args filter.

    add_filter( 'ctz_post_request_args', 'example_ctz_post_request_args' );
    
    function example_ctz_post_request_args( $args ) {
      $args['timeout'] = 300;
      return $args;
    }

    Or else is is possible to have the form ignore responses and errors and show a success as long as there was no error on the site it’s installed on?

    Yes. It’s not recommendable, but you can use the ctz_trigger_webhook_error_message filter.

    add_filter( 'ctz_trigger_webhook_error_message', '__return_empty_string' );

    Another strange thing: If I’m inspecting the page with the Chrome developer console, the form submission works. If the the developer console is closed (as it normally would be), it fails.

    Sounds a cache problem (as console in general invalidates cache) or another settings like networking emulation. Very confusing indeed.

    Thread Starter ajproline

    (@ajproline)

    Where would this line be added? Functions.php?

    add_filter( 'ctz_trigger_webhook_error_message', '__return_empty_string' );

    Is 300 in the first code 300 seconds or 300 milliseconds? If I wanted the timeout to be 10 seconds, would I make this 10000?

    • This reply was modified 1 year, 5 months ago by ajproline.
    • This reply was modified 1 year, 5 months ago by ajproline.
    Plugin Author Mário Valney

    (@mariovalney)

    Yes.

    Every snippet should be in functions.php for themes or you can create your own plugin. Please check the links for more details.

    About the time: it’s in seconds (as you can read here).

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Form Fails When Webhook Active’ is closed to new replies.