Customers list “No data to display”
-
This is happening in 8.3.0 on production, and after updating to 8.4.0 on staging. Below the table it says “Page 1 of 88” and “2,194 customers” but the table itself is empty.
- Storefront is the active theme.
- WooCommerce is the only active plugin.
- WP_DEBUG is enabled, and there are no errors generated in WC’s Tools > Logs, nor WP’s debug.log, nor in Apache’s error.log.
- There are no errors in JavaScript console or Network tab.
- I ran the “Verify base database tables” tool and got “Database verified successfully.”
If I do a search for a customer, it does generate an error in debug.log:
[13-Dec-2023 20:01:14 UTC] WordPress database error Unknown column '0000-00-00 00:00:00' in 'field list' for query SELECT wpjk_wc_customer_lookup.customer_id as id, user_id, username, CONCAT_WS( ' ', first_name, last_name ) as name, email, country, city, state, postcode, date_registered, IF( date_last_active <= "0000-00-00 00:00:00", NULL, date_last_active ) AS date_last_active, MAX( wpjk_wc_order_stats.date_created ) as date_last_order, SUM( CASE WHEN parent_id = 0 THEN 1 ELSE 0 END ) as orders_count, SUM( total_sales ) as total_spend, CASE WHEN SUM( CASE WHEN parent_id = 0 THEN 1 ELSE 0 END ) = 0 THEN NULL ELSE SUM( total_sales ) / SUM( CASE WHEN parent_id = 0 THEN 1 ELSE 0 END ) END AS avg_order_value FROM wpjk_wc_customer_lookup LEFT JOIN wpjk_wc_order_stats ON wpjk_wc_customer_lookup.customer_id = wpjk_wc_order_stats.customer_id AND ( wpjk_wc_order_stats.status NOT IN ( 'wc-auto-draft','wc-trash','wc-pending','wc-failed','wc-cancelled','wc-checkout-draft' ) ) WHERE 1=1 AND CONCAT_WS( ' ', first_name, last_name ) LIKE '%greg%' GROUP BY wpjk_wc_customer_lookup.customer_id ORDER BY date_registered desc LIMIT 0, 10 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, Automattic\WooCommerce\Admin\API\Reports\Customers\Controller->get_items, Automattic\WooCommerce\Admin\API\Reports\Customers\Query->get_data, WC_Data_Store->__call, Automattic\WooCommerce\Admin\API\Reports\Customers\DataStore->get_data [13-Dec-2023 20:01:14 UTC] WordPress database error Unknown column '0000-00-00 00:00:00' in 'field list' for query SELECT wpjk_wc_customer_lookup.customer_id as id, user_id, username, CONCAT_WS( ' ', first_name, last_name ) as name, email, country, city, state, postcode, date_registered, IF( date_last_active <= "0000-00-00 00:00:00", NULL, date_last_active ) AS date_last_active, MAX( wpjk_wc_order_stats.date_created ) as date_last_order, SUM( CASE WHEN parent_id = 0 THEN 1 ELSE 0 END ) as orders_count, SUM( total_sales ) as total_spend, CASE WHEN SUM( CASE WHEN parent_id = 0 THEN 1 ELSE 0 END ) = 0 THEN NULL ELSE SUM( total_sales ) / SUM( CASE WHEN parent_id = 0 THEN 1 ELSE 0 END ) END AS avg_order_value FROM wpjk_wc_customer_lookup LEFT JOIN wpjk_wc_order_stats ON wpjk_wc_customer_lookup.customer_id = wpjk_wc_order_stats.customer_id AND ( wpjk_wc_order_stats.status NOT IN ( 'wc-auto-draft','wc-trash','wc-pending','wc-failed','wc-cancelled','wc-checkout-draft' ) ) WHERE 1=1 AND CONCAT_WS( ' ', first_name, last_name ) LIKE '%greg%' GROUP BY wpjk_wc_customer_lookup.customer_id ORDER BY date_registered desc LIMIT 0, 10 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, Automattic\WooCommerce\Admin\API\Reports\Customers\Controller->get_items, Automattic\WooCommerce\Admin\API\Reports\Customers\Query->get_data, WC_Data_Store->__call, Automattic\WooCommerce\Admin\API\Reports\Customers\DataStore->get_data
If necessary, I can post specific info from the WC status report, but nothing looks relevant; everything is green or regular gray.
- The topic ‘Customers list “No data to display”’ is closed to new replies.