wordpress - WP联系表格不起作用,提交表格后永远旋转轮子
问题描述
我在我们的网站上创建了一个联系表格,我认为它在过去有效,但现在当您单击提交按钮时没有任何反应,并且出现蓝色旋转轮并且没有任何反应。
有谁知道它可以是什么?有些人设法通过删除密码保护插件来修复它,但我没有启用它。
使用联系表链接到网站:https ://www.hamarbilpleie.no/kontakt-oss/
[03-Mar-2021 20:31:48 UTC] PHP Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/2/h/hamarbilpleie/www/wp-content/themes/carservice/contact_form.php on line 261
[03-Mar-2021 20:31:48 UTC] PHP Fatal error: Uncaught TypeError: Argument 1 passed to cs_phpmailer_init() must be an instance of PHPMailer, instance of PHPMailer\PHPMailer\PHPMailer given, called in /home/2/h/hamarbilpleie/www/wp-includes/class-wp-hook.php on line 287 and defined in /home/2/h/hamarbilpleie/www/wp-content/themes/carservice/functions.php:298 Stack trace:
#0 /home/2/h/hamarbilpleie/www/wp-includes/class-wp-hook.php(287): cs_phpmailer_init(Object(PHPMailer\PHPMailer\PHPMailer))
#1 /home/2/h/hamarbilpleie/www/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters('', Array)
#2 /home/2/h/hamarbilpleie/www/wp-includes/plugin.php(551): WP_Hook->do_action(Array)
#3 /home/2/h/hamarbilpleie/www/wp-includes/pluggable.php(494): do_action_ref_array('phpmailer_init', Array)
#4 /home/2/h/hamarbilpleie/www/wp-content/themes/carservice/contact_form.php(280): wp_mail(Array, 'Foresp\xC3\xB8rsel fr...', 'F\xC3\xB8lgende henve...', Array)
#5 /home/2/h/hamarbilpleie/www/wp-includes/class-wp-hook.php(287): cs_theme_contact_form('')
#6 /home/2/h/hamarbilple in /home/2/h/hamarbilpleie/www/wp-content/themes/carservice/functions.php on line 298
解决方案
可能您在 Javascript 中遇到错误。您需要做的是,在浏览器中打开开发者工具,然后转到控制台选项卡。您会在那里找到错误消息。复制该错误并与我们分享。
编辑
当数据提交到服务器时,我可以看到有一个 500 内部服务器错误(基于您提供的屏幕截图)。您需要做的是,查看您的服务器内部是否创建了任何错误日志。它将提供一些有关导致问题的原因的信息。请与我们分享。如果您看不到它,请按照以下说明操作:在 WordPress 中调试
编辑 2
functions.php
您的主题文件中似乎有两个问题。它使用了一个折旧的功能,而另一个可能是因为旧代码。行号是#261
和#298
( /wp-content/themes/carservice/functions.php
)。最简单的方法是让您的主题开发人员为您修复它。如果您的主题和插件有可用的更新,请确保更新它。请注意,如果您对functions.php
文件进行了任何修改,而不是在子主题中进行,这些更改将在您更新主题时被覆盖。
推荐阅读
- angular - JWT 在 Express 和 Angular 应用程序中立即过期
- c++ - 在 GCC 中避免或警告从 const char* 到 bool 的隐式转换
- html - 为什么导航栏下拉菜单不垂直对齐?
- keras - 如何将 CNN 模型配置保存到文件
- sql - Kubernetes 并将数据从 SQL 获取到不同的服务器
- php - PHP:在 Ajax 请求中找不到页面 404
- javascript - Select Field OnChange, Make Show/Hide, Shows Initially but Once Gone, Cant ReShow
- android - 可折叠视图不适用于 viewpager
- python - 多处理队列 - 子进程有时会卡住并且不会收获
- java - 仅当一个字符在匹配中出现 n 次时如何匹配?