admin管理员组文章数量:1296454
I'm getting a WordPress "table doesn't exist" error in my debug.log, but unlike most errors it doesn't give a full stack trace to help me isolate the code. Anyone know how to tell WordPress to dump a full stack trace for this error? Thanks!
[03-Apr-2021 08:19:39 UTC] WordPress database error Table '**********.wp_47_wslusersprofiles' doesn't exist for query SELECT id, object_sha FROM `wp_47_wslusersprofiles` where user_id = 33 and provider = 'Google' and identifier = '115473556036777077042' made by require('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('init'), WP_Hook->do_action, WP_Hook->apply_filters, wsl_process_login, wsl_process_login_end, wsl_process_login_update_wsl_user_data, wsl_store_hybridauth_user_profile
More context: I know the wslusersprofiles
table isn't a standard WordPress table. What puzzles me is why I'm not getting a normal stack trace in my debug.log
file like I would for a PHP Error, Warning, or Notice. It's as if the WordPress database class is trapping this error and only issuing an error_log()
notification, without throwing a PHP error. Is there a way to force it to throw an exception? Or at least dump more details?
I'm getting a WordPress "table doesn't exist" error in my debug.log, but unlike most errors it doesn't give a full stack trace to help me isolate the code. Anyone know how to tell WordPress to dump a full stack trace for this error? Thanks!
[03-Apr-2021 08:19:39 UTC] WordPress database error Table '**********.wp_47_wslusersprofiles' doesn't exist for query SELECT id, object_sha FROM `wp_47_wslusersprofiles` where user_id = 33 and provider = 'Google' and identifier = '115473556036777077042' made by require('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('init'), WP_Hook->do_action, WP_Hook->apply_filters, wsl_process_login, wsl_process_login_end, wsl_process_login_update_wsl_user_data, wsl_store_hybridauth_user_profile
More context: I know the wslusersprofiles
table isn't a standard WordPress table. What puzzles me is why I'm not getting a normal stack trace in my debug.log
file like I would for a PHP Error, Warning, or Notice. It's as if the WordPress database class is trapping this error and only issuing an error_log()
notification, without throwing a PHP error. Is there a way to force it to throw an exception? Or at least dump more details?
1 Answer
Reset to default 0You are not seeing a stack trace because this information is being logged via the error_log()
function within the wpdb::print_error()
method. error_log()
simply sends a message to the logs.
The behaviour you're expecting with a full stack trace would require trigger_error()
to be used.
本文标签: databaseHow to get the full stack trace for WordPress quottable doesn39t existquot error in debuglog
版权声明:本文标题:database - How to get the full stack trace for WordPress "table doesn't exist" error in debug.log? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741636146a2389650.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
wsl
and does things with user profiles that adds thewslusersprofiles
table, you will need to contact their support rroute – Tom J Nowell ♦ Commented Apr 3, 2021 at 19:33wslusersprofiles
table isn't a standard WordPress table. My question is how to get a stack track so I can identify and debug the code that is causing this error. I'll edit my question to clarify this point. – Martin_W Commented Apr 4, 2021 at 5:46