
如图所示在更新到【20250317】最新版本后,出现了签到报错的情况,麻烦作者解决以下。
mrTwelve - www.minapper.com
安装更新插件后 禁用启用一次
另外反馈问题最好带上debug报错 不然就是在算命
在 WordPress 中调试(Debug)通常涉及以下几个步骤,可以帮助你定位和解决网站运行中的错误或异常问题。以下是详细的调试方法:
修改 wp-config.php
文件
找到 WordPress 根目录下的 wp-config.php
文件,添加或修改以下代码:
// 启用调试模式
define('WP_DEBUG', true);
// 将错误记录到 /wp-content/debug.log(可选)
define('WP_DEBUG_LOG', true);
// 在页面上显示错误(仅开发环境建议开启)
define('WP_DEBUG_DISPLAY', true);
// 禁用 WordPress 自动修正 HTML 功能(可选)
define('SCRIPT_DEBUG', true);
WP_DEBUG_LOG
: 错误会写入到 wp-content/debug.log
文件中。 WP_DEBUG_DISPLAY
: 设置为 false
可隐藏页面上的错误信息(适合生产环境)。 查看调试日志
错误日志会生成在 wp-content/debug.log
中,通过 FTP 或服务器文件管理器可直接查看。
Query Monitor
Debug Bar
Log Deprecated Notices
/var/log/apache2/error.log
或 /var/log/nginx/error.log
(路径可能因环境不同而变化)。 白屏(White Screen of Death, WSOD)
wp-content/themes/your-theme
改为 your-theme-bak
),强制切换为默认主题。 wp-content/plugins
目录重命名为 plugins-bak
。 主题/插件冲突
Xdebug(本地开发推荐)
php.ini
中启用并配置 IDE(如 VS Code、PhpStorm)。 Browser DevTools
WP-CLI
wp option list # 查看所有选项
wp cron event list # 检查计划任务
wp-config.php
中的 WP_DEBUG
设为 false
,避免泄露敏感信息。 在 functions.php
中添加自定义调试代码:
// 记录自定义调试信息到 debug.log
if (!function_exists('log_message')) {
function log_message($message) {
if (WP_DEBUG === true) {
error_log(print_r($message, true));
}
}
}
// 使用示例
log_message('当前用户ID:' . get_current_user_id());
通过以上方法,你可以系统地排查 WordPress 中的问题。如果遇到具体错误信息,可以结合日志和工具进一步分析!
x***@qq.com (作者)
debug.log里的内容:
[20-Apr-2025 10:30:52 UTC] PHP Notice: Function _load_textdomain_just_in_time was called <strong>incorrectly</strong>. Translation loading for the <code>health-check</code> 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 <code>init</code> action or later. Please see <a href="https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 6.7.0.) in /www/wwwroot/xinenw.com/wp-includes/functions.php on line 6121
[20-Apr-2025 10:31:01 UTC] PHP Notice: Function _load_textdomain_just_in_time was called <strong>incorrectly</strong>. Translation loading for the <code>health-check</code> 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 <code>init</code> action or later. Please see <a href="https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 6.7.0.) in /www/wwwroot/xinenw.com/wp-includes/functions.php on line 6121
[20-Apr-2025 10:31:03 UTC] PHP Notice: Function _load_textdomain_just_in_time was called <strong>incorrectly</strong>. Translation loading for the <code>health-check</code> 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 <code>init</code> action or later. Please see <a href="https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 6.7.0.) in /www/wwwroot/xinenw.com/wp-includes/functions.php on line 6121
[20-Apr-2025 10:31:03 UTC] PHP Notice: Function _load_textdomain_just_in_time was called <strong>incorrectly</strong>. Translation loading for the <code>health-check</code> 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 <code>init</code> action or later. Please see <a href="https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 6.7.0.) in /www/wwwroot/xinenw.com/wp-includes/functions.php on line 6121
[20-Apr-2025 10:31:03 UTC] PHP Warning: Undefined array key 0 in /www/wwwroot/xinenw.com/wp-content/plugins/app-craft/includes/class/appcraft-user-profile.php on line 38
[20-Apr-2025 10:31:03 UTC] PHP Warning: Undefined array key 0 in /www/wwwroot/xinenw.com/wp-content/plugins/app-craft/includes/class/appcraft-user-profile.php on line 39
[20-Apr-2025 10:31:03 UTC] PHP Notice: Function _load_textdomain_just_in_time was called <strong>incorrectly</strong>. Translation loading for the <code>health-check</code> 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 <code>init</code> action or later. Please see <a href="https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 6.7.0.) in /www/wwwroot/xinenw.com/wp-includes/functions.php on line 6121
[20-Apr-2025 10:31:03 UTC] PHP Notice: Function _load_textdomain_just_in_time was called <strong>incorrectly</strong>. Translation loading for the <code>health-check</code> 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 <code>init</code> action or later. Please see <a href="https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 6.7.0.) in /www/wwwroot/xinenw.com/wp-includes/functions.php on line 6121
[20-Apr-2025 10:31:04 UTC] PHP Notice: Function _load_textdomain_just_in_time was called <strong>incorrectly</strong>. Translation loading for the <code>health-check</code> 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 <code>init</code> action or later. Please see <a href="https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 6.7.0.) in /www/wwwroot/xinenw.com/wp-includes/functions.php on line 6121
[20-Apr-2025 10:31:05 UTC] PHP Notice: Function _load_textdomain_just_in_time was called <strong>incorrectly</strong>. Translation loading for the <code>health-check</code> 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 <code>init</code> action or later. Please see <a href="https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 6.7.0.) in /www/wwwroot/xinenw.com/wp-includes/functions.php on line 6121
[20-Apr-2025 10:31:05 UTC] WordPress database error Unknown column 'transaction_id' in 'where clause' for query SELECT id FROM wp_appcraft_points_log WHERE transaction_id = 'pt_6804cce9c176f9561' LIMIT 1 made by require('wp-blog-header.php'), wp, WP->main, WP->parse_request, do_action_ref_array('parse_request'), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, appcraft_signin_api, appcraft_user_sign_in, appcraft_manage_points, appcraft_log_points
[20-Apr-2025 10:31:05 UTC] WordPress database error Unknown column 'transaction_id' in 'field list' for query INSERT INTO `wp_appcraft_points_log` (`user_id`, `event`, `points_earned`, `inviter_id`, `current_points`, `inviter_count`, `article_id`, `time`, `type`, `transaction_id`) VALUES (1, '用户签到', '5', '0', '100', '0', NULL, '2025-04-20 18:31:05', 'check_in', 'pt_6804cce9c176f9561') made by require('wp-blog-header.php'), wp, WP->main, WP->parse_request, do_action_ref_array('parse_request'), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, appcraft_signin_api, appcraft_user_sign_in, appcraft_manage_points, appcraft_log_points
[20-Apr-2025 10:31:05 UTC] Failed to log points for user 1: Failed to insert points log:
[20-Apr-2025 10:31:05 UTC] Points operation failed: Failed to insert points log:
[20-Apr-2025 10:31:07 UTC] PHP Notice: Function _load_textdomain_just_in_time was called <strong>incorrectly</strong>. Translation loading for the <code>health-check</code> 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 <code>init</code> action or later. Please see <a href="https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 6.7.0.) in /www/wwwroot/xinenw.com/wp-includes/functions.php on line 6121
[20-Apr-2025 10:31:08 UTC] PHP Notice: Function _load_textdomain_just_in_time was called <strong>incorrectly</strong>. Translation loading for the <code>health-check</code> 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 <code>init</code> action or later. Please see <a href="https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 6.7.0.) in /www/wwwroot/xinenw.com/wp-includes/functions.php on line 6121
[20-Apr-2025 10:31:10 UTC] PHP Notice: Function _load_textdomain_just_in_time was called <strong>incorrectly</strong>. Translation loading for the <code>health-check</code> 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 <code>init</code> action or later. Please see <a href="https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 6.7.0.) in /www/wwwroot/xinenw.com/wp-includes/functions.php on line 6121
[20-Apr-2025 10:31:10 UTC] PHP Notice: Function _load_textdomain_just_in_time was called <strong>incorrectly</strong>. Translation loading for the <code>health-check</code> 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 <code>init</code> action or later. Please see <a href="https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 6.7.0.) in /www/wwwroot/xinenw.com/wp-includes/functions.php on line 6121
[20-Apr-2025 10:31:11 UTC] PHP Notice: Function _load_textdomain_just_in_time was called <strong>incorrectly</strong>. Translation loading for the <code>health-check</code> 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 <code>init</code> action or later. Please see <a href="https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 6.7.0.) in /www/wwwroot/xinenw.com/wp-includes/functions.php on line 6121
[20-Apr-2025 10:31:11 UTC] WordPress database error Unknown column 'transaction_id' in 'where clause' for query SELECT id FROM wp_appcraft_points_log WHERE transaction_id = 'pt_6804ccefac5552743' LIMIT 1 made by require('wp-blog-header.php'), wp, WP->main, WP->parse_request, do_action_ref_array('parse_request'), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, appcraft_signin_api, appcraft_user_sign_in, appcraft_manage_points, appcraft_log_points
[20-Apr-2025 10:31:11 UTC] WordPress database error Unknown column 'transaction_id' in 'field list' for query INSERT INTO `wp_appcraft_points_log` (`user_id`, `event`, `points_earned`, `inviter_id`, `current_points`, `inviter_count`, `article_id`, `time`, `type`, `transaction_id`) VALUES (1, '用户签到', '5', '0', '100', '0', NULL, '2025-04-20 18:31:11', 'check_in', 'pt_6804ccefac5552743') made by require('wp-blog-header.php'), wp, WP->main, WP->parse_request, do_action_ref_array('parse_request'), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, appcraft_signin_api, appcraft_user_sign_in, appcraft_manage_points, appcraft_log_points
[20-Apr-2025 10:31:11 UTC] Failed to log points for user 1: Failed to insert points log:
[20-Apr-2025 10:31:11 UTC] Points operation failed: Failed to insert points log:
[20-Apr-2025 10:31:12 UTC] PHP Notice: Function _load_textdomain_just_in_time was called <strong>incorrectly</strong>. Translation loading for the <code>health-check</code> 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 <code>init</code> action or later. Please see <a href="https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 6.7.0.) in /www/wwwroot/xinenw.com/wp-includes/functions.php on line 6121
[20-Apr-2025 10:31:15 UTC] PHP Notice: Function _load_textdomain_just_in_time was called <strong>incorrectly</strong>. Translation loading for the <code>health-check</code> 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 <code>init</code> action or later. Please see <a href="https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 6.7.0.) in /www/wwwroot/xinenw.com/wp-includes/functions.php on line 6121
[20-Apr-2025 10:31:15 UTC] PHP Warning: Undefined array key 0 in /www/wwwroot/xinenw.com/wp-content/plugins/app-craft/includes/class/appcraft-user-profile.php on line 38
[20-Apr-2025 10:31:15 UTC] PHP Warning: Undefined array key 0 in /www/wwwroot/xinenw.com/wp-content/plugins/app-craft/includes/class/appcraft-user-profile.php on line 39
[20-Apr-2025 10:31:18 UTC] PHP Notice: Function _load_textdomain_just_in_time was called <strong>incorrectly</strong>. Translation loading for the <code>health-check</code> 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 <code>init</code> action or later. Please see <a href="https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 6.7.0.) in /www/wwwroot/xinenw.com/wp-includes/functions.php on line 6121
[20-Apr-2025 10:31:18 UTC] WordPress database error Unknown column 'transaction_id' in 'where clause' for query SELECT id FROM wp_appcraft_points_log WHERE transaction_id = 'pt_6804ccf66f8b35390' LIMIT 1 made by require('wp-blog-header.php'), wp, WP->main, WP->parse_request, do_action_ref_array('parse_request'), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, appcraft_signin_api, appcraft_user_sign_in, appcraft_manage_points, appcraft_log_points
[20-Apr-2025 10:31:18 UTC] WordPress database error Unknown column 'transaction_id' in 'field list' for query INSERT INTO `wp_appcraft_points_log` (`user_id`, `event`, `points_earned`, `inviter_id`, `current_points`, `inviter_count`, `article_id`, `time`, `type`, `transaction_id`) VALUES (1, '用户签到', '5', '0', '100', '0', NULL, '2025-04-20 18:31:18', 'check_in', 'pt_6804ccf66f8b35390') made by require('wp-blog-header.php'), wp, WP->main, WP->parse_request, do_action_ref_array('parse_request'), WP_Hook->do_action, WP_Hook->apply_filters, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, WP_REST_Server->respond_to_request, appcraft_signin_api, appcraft_user_sign_in, appcraft_manage_points, appcraft_log_points
[20-Apr-2025 10:31:18 UTC] Failed to log points for user 1: Failed to insert points log:
[20-Apr-2025 10:31:18 UTC] Points operation failed: Failed to insert points log: