Elementor表格:“发生错误”当我使用自定义Webhook URL时

发布于 2025-02-12 08:56:49 字数 501 浏览 1 评论 0原文

我提交Elementor表单时,我会从Elementor表单中获得一个错误。 我将Webhook提交给自定义URL后配置了操作。 我不知道问题是否是我的挂钩功能没有应有的响应。

configuration:form form submits

配置:webhook

提交后的错误消息

我应该指出,当我在提交列表后从操作中删除操作中的webhook时,我不再遇到这个错误。

I get a message An error occurred. from elementor form when i submit my elementor form.
I configured the Actions after submit with a webhook to a custom url.
I don't know if the problem is my hook function not responding as it should.

Configuration : After Form Submit

Configuration : WebHook

The error message after the submition

I should point out that when I remove the webhook from the Actions after submit list, I no longer get this error.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

梦忆晨望 2025-02-19 08:56:49

我也有类似的问题,我也收到了一个Elementor表单错误消息,这原来是一个超时问题。

默认情况下,超时设置为仅5秒。可以通过使用PHP中的add_filter来增加这一点。例如,如果您将make.com用作webhook,则可以指定:

add_filter('http_request_timeout', function($timeout, $url = '') {
    $start_with = 'https://hook.us1.make.com';
    
    //return is_string($url) && str_starts_with($url, $start_with) // PHP 8
    return is_string($url) && strncmp($url, $start_with, strlen($start_with)) === 0 // PHP 7 or older
        ? 30 // TODO: set appropriate timeout, WordPress default is 5 seconds
        : $timeout; // return unchanged url for other requests
}, 10, 2);

请参阅此处的原始问题:
https://github.com/elementor/elementor/elementor/elementor/sissues/20452

I had a similar issue, I also got an Elementor Forms error message, which turned out to be a timeout issue.

By default, the timeout is set to only 5 seconds. This can be increased by using an add_filter in PHP. For example, if you are using make.com as the webhook, you can specify:

add_filter('http_request_timeout', function($timeout, $url = '') {
    $start_with = 'https://hook.us1.make.com';
    
    //return is_string($url) && str_starts_with($url, $start_with) // PHP 8
    return is_string($url) && strncmp($url, $start_with, strlen($start_with)) === 0 // PHP 7 or older
        ? 30 // TODO: set appropriate timeout, WordPress default is 5 seconds
        : $timeout; // return unchanged url for other requests
}, 10, 2);

See the original issue here:
https://github.com/elementor/elementor/issues/20452

囍笑 2025-02-19 08:56:49

问题,我添加了return json_encode(array(“ success” => true)); 到了回调函数的末尾,并解决了问题。

我知道我的自定义URL无法正确响应的

I understood the problem

My custom url was not responding correctly, I added return json_encode(array("success"=>true)); to the end of the callback function and that solved the problem.

十六岁半 2025-02-19 08:56:49

就我而言,错误是在SSL证书状态中。
我尝试了Postman的请求并收到警告,该DE SSL证书是不可能的。 “无法验证第一个证书”

更改为使用SSL正确验证并起作用的另一个域。

In my case the error was in SSL certificate status.
I tried request from postman and receive an warning, that de SSL Certificate is unabled to verify. "Unable to verify the first certificate"

Change to another domain with SSL correctly verified and works.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文