WordPress中的登录页面出错

时间:2019-02-20 作者:meysam

您好,今天我的wordpress博客位于wp admin和wp login。php出错

Notice: wp_deregister_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.) in /home/sedabaran/public_html/wp-includes/functions.php on line 4196

Notice: wp_deregister_script was called incorrectly. Do not deregister the jquery script in the administration area. To target the front-end theme, use the wp_enqueue_scripts hook. Please see Debugging in WordPress for more information. (This message was added in version 3.6.0.) in /home/sedabaran/public_html/wp-includes/functions.php on line 4196

Notice: wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.) in /home/sedabaran/public_html/wp-includes/functions.php on line 4196

Notice: wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.) in /home/sedabaran/public_html/wp-includes/functions.php on line 4196

Warning: Cannot modify header information - headers already sent by (output started at /home/mywebsite/public_html/wp-includes/functions.php:4196) in /home/mywebsite/public_html/wp-login.php on line 423

Warning: Cannot modify header information - headers already sent by (output started at /home/mywebsite/public_html/wp-includes/functions.php:4196) in /home/mywebsite/public_html/wp-login.php on line 436

Warning: Cannot modify header information - headers already sent by (output started at /home/mywebsite/public_html/wp-includes/functions.php:4196) in /home/sedabaran/public_html/wp-includes/pluggable.php on line 948

Warning: Cannot modify header information - headers already sent by (output started at /home/mywebsite/public_html/wp-includes/functions.php:4196) in /home/mywebsite/public_html/wp-includes/pluggable.php on line 949

Warning: Cannot modify header information - headers already sent by (output started at /home/mywebsite/public_html/wp-includes/functions.php:4196) in /home/mywebsite/public_html/wp-includes/pluggable.php on line 950

Warning: Cannot modify header information - headers already sent by (output started at /home/mywebsite/public_html/wp-includes/functions.php:4196) in /home/mywebsite/public_html/wp-includes/pluggable.php on line 951

Warning: Cannot modify header information - headers already sent by (output started at /home/mywebsite/public_html/wp-includes/functions.php:4196) in /home/mywebsite/public_html/wp-includes/pluggable.php on line 952

Warning: Cannot modify header information - headers already sent by (output started at /home/mywebsite/public_html/wp-includes/functions.php:4196) in /home/mywebsite/public_html/wp-includes/pluggable.php on line 953

Warning: Cannot modify header information - headers already sent by (output started at /home/mywebsite/public_html/wp-includes/functions.php:4196) in /home/mywebsite/public_html/wp-includes/pluggable.php on line 956

Warning: Cannot modify header information - headers already sent by (output started at /home/mywebsite/public_html/wp-includes/functions.php:4196) in /home/mywebsite/public_html/wp-includes/pluggable.php on line 957

Warning: Cannot modify header information - headers already sent by (output started at /home/mywebsite/public_html/wp-includes/functions.php:4196) in /home/mywebsite/public_html/wp-includes/pluggable.php on line 960

Warning: Cannot modify header information - headers already sent by (output started at /home/mywebsite/public_html/wp-includes/functions.php:4196) in /home/mywebsite/public_html/wp-includes/pluggable.php on line 961

Warning: Cannot modify header information - headers already sent by (output started at /home/mywebsite/public_html/wp-includes/functions.php:4196) in /home/mywebsite/public_html/wp-includes/pluggable.php on line 962

Warning: Cannot modify header information - headers already sent by (output started at /home/mywebsite/public_html/wp-includes/functions.php:4196) in /home/mywebsite/public_html/wp-includes/pluggable.php on line 963

Warning: Cannot modify header information - headers already sent by (output started at /home/mywebsite/public_html/wp-includes/functions.php:4196) in /home/mywebsite/public_html/wp-includes/pluggable.php on line 966

Warning: Cannot modify header information - headers already sent by (output started at /home/mywebsite/public_html/wp-includes/functions.php:4196) in /home/mywebsite/public_html/wp-includes/pluggable.php on line 967

Warning: Cannot modify header information - headers already sent by (output started at /home/mywebsite/public_html/wp-includes/functions.php:4196) in /home/mywebsite/public_html/wp-includes/pluggable.php on line 968

Warning: Cannot modify header information - headers already sent by (output started at /home/mywebsite/public_html/wp-includes/functions.php:4196) in /home/mywebsite/public_html/wp-includes/pluggable.php on line 969

Warning: Cannot modify header information - headers already sent by (output started at /home/mywebsite/public_html/wp-includes/functions.php:4196) in /home/mywebsite/public_html/wp-includes/pluggable.php on line 972
如何修复此错误请注意,我无法登录该网站非常感谢

1 个回复
SO网友:Jacob Peattie

这个错误的主要原因是,在你网站的某个地方,可能是你的主题或插件,有人错误地使用了某些功能。

错误消息本身很好地描述了问题:

  1. 在WP_______________________________________________
所有其他错误都是由于前四条错误消息提前输出而导致的,并且在前四条错误消息解决后会消失。

这意味着有人添加了用于排队和出列脚本的代码,这些脚本可能看起来很像:

wp_deregister_script( \'jquery\' );
wp_register_script( \'jquery\', \'some/url/here\', ...);
wp_enqueue_script( \'jquery\' );
错误的原因是这些函数显然只是针对函数。php或插件文件hooked.

至少,它需要如下所示:

function wpse_329345_bad_jquery_nonsense() {
    wp_deregister_script( \'jquery\' );
    wp_register_script( \'jquery\', \'some/url/here\', ...);
    wp_enqueue_script( \'jquery\' );
}
add_action( \'wp_enqueue_scripts\', \'wpse_329345_bad_jquery_nonsense\' );
我首先要查找有问题的代码(如果其他人在该站点上工作)是functions.php 主题目录中的文件。如果您找到了,请进行您可以在我的示例中看到的更改(或者删除它,因为您应该not be enqueueing your own jQuery)。这应该可以解决问题。

所说的一切。这些只是调试消息,旨在通知开发人员他们做错了什么。出现这些错误是因为您在站点上启用了调试。如果站点处于活动状态,则不应启用可见的调试消息。可以通过禁用WP_DEBUG. 启用it的说明如下here. 遵循这些,但将值设置为false 而不是true 禁用它。

相关推荐

无论如何,要像使用wp_LOGIN_Form()一样输出注册表单吗?

我正在尝试用WordPress创建一个双重登录/注册页面,到目前为止,我发现我可以创建自定义模板,然后用wp_login_form, 然而,我找不到任何能够对注册表进行类似操作的参考。我看了几篇文章,也没有一篇提到类似的内容,其中许多文章只是求助于插件。有没有办法做到这一点,或者我必须选择另一种方式来定制现有的注册页面,看看是否可以在上面输出登录表单!?