WordPress程序更新了6.7版本,此版本会导致PHP抛出错误。此错误影响多个插件。下面给大家发一下临时解决方式。

https://core.trac.wordpress.org/ticket/44937#comment:33

WordPress 6.7版本init加载报错处理:Function _load_textdomain_just_in_time was called incorrectly

错误信息

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the all-in-one-seo-pack domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /www/wwwroot/xxxxx/wp-includes/functions.php on line 6114

WordPress 6.7版本init加载报错处理:Function _load_textdomain_just_in_time was called incorrectly

解决方式

两个方式可以暂时关闭错误信息在网站页面的显示。

方式1.关闭WordPress调试模式

打开网站根目录的wp-config.php配置文件,搜索“WP_DEBUG”,将true改为False可以关闭错误输出。

WordPress 6.7版本init加载报错处理:Function _load_textdomain_just_in_time was called incorrectly

方式2.记录错误日志,并禁用错误信息显示。

打开wp-includes目录中的Function.PHP 文件中添加下面代码

// 启用WP_DEBUG模式
define( ‘WP_DEBUG’, true );
// 启用调试日志记录到/wp-content/debug.log文件
define( ‘WP_DEBUG_LOG’, true );
// 禁用错误和警告显示
define( ‘WP_DEBUG_DISPLAY’, false );
@ini_set( ‘display_errors’, 0 );

WordPress 6.7版本init加载报错处理:Function _load_textdomain_just_in_time was called incorrectly

 

后期等各个插件更新版本,就可以解决这个错误信息显示了。

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。