Hey @jonathanmoorebcsorg – it seems that the prefix is either corrupted or not properly parsed? How long is the prefix? Is this a multisite?
Thread Starter
jomo
(@jonathanmoorebcsorg)
It is multisite
The prefix is standard wp_
The site is actually working.. hence the mystery
@jonathanmoorebcsorg Are the errors still occurring? Have you been able to isolate where they are coming from?
If not, we recommend creating a staging site, WP Staging is a good option for this. Then if you have any plugins that might edit user data, deactivate them and place an order as a new user to see if the error still occurs. If it does, deactivate all plugins but WooCommerce and place an order to see if the error still occurs.
If the error is gone with the first test, then you know where the problem is. If it’s resolved with the second, then you can activate other plugins a couple at a time and place a new order each time until the problem returns. This will narrow down which plugin is causing the error.
Thread Starter
jomo
(@jonathanmoorebcsorg)
it’s a mystery, the site is active and processing orders and I didn’t see the error for several days and then it reappears again once per day, at such low frequency that it’s hard to catch:
[13-Jun-2018 17:34:07 UTC] WordPress database error Table 'yoursite_www.usermeta' doesn't exist for query INSERT INTO <code>usermeta</code>( user_id, meta_key, meta_value )
VALUES ( ...' ) made by do_action('wp_ajax_nopriv_save_data'), WP_Hook->do_action, WP_Hook->apply_filters, save_data
[14-Jun-2018 01:32:24 UTC] WordPress database error Table 'yoursite_www.usermeta' doesn't exist for query INSERT INTO <code>usermeta</code>( user_id, meta_key, meta_value )
VALUES (...) made by do_action('wp_ajax_nopriv_save_data'), WP_Hook->do_action, WP_Hook->apply_filters, save_data
[15-Jun-2018 18:15:33 UTC] Erreur de la base de données WordPress Table 'yoursite_www.usermeta' doesn't exist pour la requête INSERT INTO <code>usermeta</code>( user_id, meta_key, meta_value )
VALUES ( ..), WP_Hook->do_action, WP_Hook->apply_filters, save_data
Yes I’m well aware of how to debug thanks for the advice, I have several test and dev sites and usually use linux and sql scripts and wp-cli for managing synchronisation and data cleansing, I’ll do so as time allows.
@jonathanmoorebcsorg Since it’s only happening once per day, I’d install Wp Crontrol https://wordpress.org/plugins/wp-crontrol/ and take a look at events that run once daily. This should help narrow down where it may be coming from.
Thread Starter
jomo
(@jonathanmoorebcsorg)
thanks for the ideas, but I know from the timings that it isn’t that.
I run the cron via unix using wp-cli command like wp cron event run –due-now
and log it to have some traceability of what is running when.
The error occurring on the hook wp_ajax_nopriv_save_data is also a big indicator that it’s not cron.
Also it’s running under the current language context of multilingual site with some errors occurring in each enabled language which wouldn’t happen with cron.
@jonathanmoorebcsorg From here there’s a couple routes to take, but neither are quick and easy. You can either do a search across all plugin flies for ( user_id, meta_key, meta_value )
to see if that turns up anything. It may or may not, depending on how the query is built. Or you can search for any actions tied to wp_ajax_nopriv_save_data
, which could potentially return hundreds of results.
Thread Starter
jomo
(@jonathanmoorebcsorg)
I only have one real prime suspect at the moment, the Abandoned Cart Lite for WooCommerce:
https://wordpress.org/support/topic/table-usermeta-doesnt-exist-for-query-insert-into-usermeta/
still, it’s a odd one