• Resolved swinggraphics

    (@swinggraphics)


    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.

Viewing 15 replies - 1 through 15 (of 28 total)
  • Mirko P.

    (@rainfallnixfig)

    Hi @swinggraphics

    Thanks for reporting this on the WooCommerce forum.

    So that we can move forward with troubleshooting, may I ask the following:

    • Your system status report: You can find it via?WooCommerce > Status. Select “Get system report” and then “Copy for support”. Once you’ve done that, you can paste it into your reply.

    Thank you!

    Thread Starter swinggraphics

    (@swinggraphics)

    @woo-hc My post includes a screenshot. I cannot provide the full system report. If necessary, I can post specific info from the WC status report, but nothing looks relevant; everything is green or regular gray.

    Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @swinggraphics

    From the error log you provided, it seems like the issue is related to the 0000-00-00 00:00:00 value in the date_last_active field. This could potentially be a date formatting issue or a problem with the database itself.

    Since you’ve already verified the base database tables and found no errors, I suggest the following steps:

    1. Please make sure that all your WordPress, WooCommerce, and PHP versions are up to date. Outdated versions can sometimes cause unexpected issues.
    2. Try re-saving your Permalinks. You can do this by going to WordPress Dashboard > Settings > Permalinks and simply click “Save Changes” at the bottom of the page.

    If the issue persists, you may consider running a conflict test. This involves deactivating all plugins except for WooCommerce and switching to a default WordPress theme like Storefront. If this resolves the issue, reactivate your plugins one by one to identify the source of the conflict.

    Additionally, can you head over to WooCommerce → Status → Tools, and do the following:

    • WooCommerce transients – Clear
    • Expired transients – Clear
    • Clear template cache – Clear
    • Capabilities – Reset Capabilities
    • Clear customer sessions -Clear

    If none of the above steps work, please let us know so we can further assist you. Your patience and cooperation are greatly appreciated.

    Thread Starter swinggraphics

    (@swinggraphics)

    From the error log you provided, it seems like the issue is related to the?0000-00-00 00:00:00?value in the?date_last_active?field. This could potentially be a date formatting issue or a problem with the database itself.

    I think a value of 0000-00-00 00:00:00 would not be a problem. I understandUnknown column '0000-00-00 00:00:00' in 'field list' means it is trying to find a column named 0000-00-00 00:00:00. Obviously that is not going to work.

    I tried all the Clear tools and flushed permalinks.

    As already noted:

    • Storefront is the active theme.
    • WooCommerce is the only active plugin.
    • All Status page items are green or gray (ie, compatible / up-to-date).
    `
    ### WordPress Environment ###
    
    WordPress address (URL): removed
    Site address (URL): removed
    WC Version: 8.4.0
    REST API Version: ? 8.4.0
    WC Blocks Version: ? 11.6.2
    Action Scheduler Version: ? 3.7.0
    Log Directory Writable: ?
    WP Version: 6.4.2
    WP Multisite: –
    WP Memory Limit: 256 MB
    WP Debug Mode: ?
    WP Cron: ?
    Language: en_US
    External object cache: –
    
    ### Server Environment ###
    
    Server Info: Apache/2.4.41 (Ubuntu)
    PHP Version: 8.0.20
    PHP Post Max Size: 16 MB
    PHP Time Limit: 60
    PHP Max Input Vars: 1000
    cURL Version: 7.68.0
    OpenSSL/1.1.1f
    
    SUHOSIN Installed: –
    MySQL Version: 8.0.30
    Max Upload Size: 16 MB
    Default Timezone is UTC: ?
    fsockopen/cURL: ?
    SoapClient: ?
    DOMDocument: ?
    GZip: ?
    Multibyte String: ?
    Remote Post: ?
    Remote Get: ?
    
    ### Database ###
    
    WC Database Version: 8.4.0
    WC Database Prefix: wpjk_
    Total Database Size: 107.97MB
    Database Data Size: 71.45MB
    Database Index Size: 36.52MB
    tables list removed
    
    ### Post Type Counts ###
    
    attachment: 604
    custom_css: 1
    gift_card: 8
    nav_menu_item: 36
    page: 16
    post: 1
    product: 169
    product_variation: 304
    revision: 343
    shop_coupon: 4
    shop_order: 3664
    shop_order_refund: 9
    wc_afrsm: 1
    
    ### Security ###
    
    Secure connection (HTTPS): ?
    Hide errors from visitors: ?
    
    ### Active Plugins (1) ###
    
    WooCommerce: by Automattic – 8.4.0
    
    ### Inactive Plugins (30) ###
    
    removed
    
    ### Settings ###
    
    API Enabled: ?
    Force SSL: ?
    Currency: USD ($)
    Currency Position: left
    Thousand Separator: ,
    Decimal Separator: .
    Number of Decimals: 2
    Taxonomies: Product Types: external (external)
    gift-card (gift-card)
    grouped (grouped)
    simple (simple)
    variable (variable)
    
    Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)
    exclude-from-search (exclude-from-search)
    featured (featured)
    outofstock (outofstock)
    rated-1 (rated-1)
    rated-2 (rated-2)
    rated-3 (rated-3)
    rated-4 (rated-4)
    rated-5 (rated-5)
    
    Connected to Woo.com: ?
    Enforce Approved Product Download Directories: –
    HPOS feature screen enabled: –
    HPOS feature enabled: –
    Order datastore: WC_Order_Data_Store_CPT
    HPOS data sync enabled: –
    
    ### WC Pages ###
    
    Shop base: #5 - /shop/
    Cart: #6 - /cart/
    Checkout: #7 - /checkout/
    My account: #8 - /my-account/
    Terms and conditions: #55 - /terms-conditions/
    
    ### Theme ###
    
    Name: Storefront
    Version: 4.5.3
    Author URL: https://woocommerce.com/
    Child Theme: ? – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme
    WooCommerce Support: ?
    
    ### Templates ###
    
    Overrides: –
    
    ### Admin ###
    
    Enabled Features: activity-panels
    analytics
    product-block-editor
    coupons
    core-profiler
    customer-effort-score-tracks
    import-products-task
    experimental-fashion-sample-products
    shipping-smart-defaults
    shipping-setting-tour
    homescreen
    marketing
    mobile-app-banner
    navigation
    onboarding
    onboarding-tasks
    product-variation-management
    product-virtual-downloadable
    remote-inbox-notifications
    remote-free-extensions
    payment-gateway-suggestions
    shipping-label-banner
    subscriptions
    store-alerts
    transient-notices
    woo-mobile-welcome
    wc-pay-promotion
    wc-pay-welcome-page
    
    Disabled Features: customize-store
    minified-js
    new-product-management-experience
    product-external-affiliate
    settings
    async-product-editor-category-field
    
    Daily Cron: ? Next scheduled: 2023-12-14 17:24:55 -05:00
    Options: ?
    Notes: 137
    Onboarding: completed
    
    ### Action Scheduler ###
    
    Complete: 170
    Oldest: 2023-11-13 11:15:54 -0500
    Newest: 2023-12-14 01:04:10 -0500
    
    Pending: 6
    Oldest: 2023-12-14 14:22:41 -0500
    Newest: 2023-12-14 14:22:41 -0500
    
    Failed: 344
    Oldest: 2020-06-25 17:01:43 -0400
    Newest: 2023-05-31 08:01:05 -0400
    
    
    ### Status report information ###
    
    Generated at: 2023-12-14 01:04:11 -05:00
    `
    Plugin Support Beauty of Code (woo-hc)

    (@beautyofcode)

    Hey @swinggraphics,

    Thanks for sharing that!

    Can you please do the following, in this same order, and see if this perhaps resolves the issue:

    • Navigate to?Analytics?→?Settings, scroll down to?Date type, and make sure that?Date Created?is selected on the dropdown:
    • Navigate to WooCommerce → Status → Tools, and click on Clear Analytics Cache
    • Import Historical Data

    Let us know how this goes!

    Thread Starter swinggraphics

    (@swinggraphics)

    Sure, that is worth a try. I cleared the analytics cache, set the Date Type, ran Delete Previously Imported Data, and then ran Re-import Data. On the Customers page, the number of customers changed to 2,784customers (up from 2,194), but still none show in the table.

    Also to note: this staging copy of the website was created some months ago and is used to preflight updates before applying to production. This issue with the customers list exists on both staging and production. It was suggested that there’s a problem with the database itself. If that is the case, it has been an unnoticed problem for a long time, or a specific update caused it on staging and production independently.

    Hi there @swinggraphics ??

    Thank you for reaching back, with further details on this.

    Also to note: this staging copy of the website was created some months ago and is used to preflight updates before applying to production. This issue with the customers list exists on both staging and production. It was suggested that there’s a problem with the database itself. If that is the case, it has been an unnoticed problem for a long time, or a specific update caused it on staging and production independently.

    Reading the last sentence, above, along with the following one, from the opening message here:

    This is happening in 8.3.0 on production, and after updating to 8.4.0 on staging. 

    We’d like to clarify the following:

    Looking forward to hearing from you!

    • This reply was modified 11 months, 2 weeks ago by anastas10s. Reason: added URLs
    Thread Starter swinggraphics

    (@swinggraphics)

    Thanks, everyone, for the ideas. We’ll keep trying.

    Staging was not showcasing the same issue before 8.4.0. Correct?

    The problem was present on staging with 8.3.0, and still present after updating.

    HPOS?is enabled, or otherwise? Currently, or at some other point in time.

    I’m sure it has never been enabled.

    Plugin Support ckadenge (woo-hc)

    (@ckadenge)

    Hi @swinggraphics,

    Thanks, everyone, for the ideas. We’ll keep trying.

    Sounds like a great idea. Please try the recommendations out and keep us updated.

    The problem was present on staging with 8.3.0, and still present after updating.

    Could you confirm of any other plugins or custom code running on your staging site as well as your productions site?

    Looking forward to your reply.

    Thread Starter swinggraphics

    (@swinggraphics)

    Sounds like a great idea. Please try the recommendations out and keep us updated.

    ??? I feel pretty sure I’ve been clear that I have tried every suggestion with no success.

    Could you confirm of any other plugins or custom code running on your staging site as well as your productions site?

    As I already said twice, staging has only WC and Storefront active. This is the only thing we need to be concerned with. I am obviously not going to experiment on production.

    Plugin Support Beauty of Code (woo-hc)

    (@beautyofcode)

    Hey @swinggraphics,

    Hmm, this indeed odd behavior, and not something we are able to replicate on our end.

    I’d like to gather a bit more information here:

    • Have there been any recent modifications to the database structure, such as changes in column names, data types, or configurations, that might coincide with when the issue started occurring?
    • Were there any recent data import/export processes or migrations that could have impacted the data integrity within the WooCommerce customer tables?
    • Apart from WooCommerce updates, have there been any updates to WordPress core, server software, or any other related software components that might have coincided with the emergence of this issue?

    Also, although I doubt this will make any difference, it’s worth a shot to check if the customer list displays when viewing this using a different browser.

    Cheers!

    Thread Starter swinggraphics

    (@swinggraphics)

    Have there been any recent modifications to the database structure, such as changes in column names, data types, or configurations, that might coincide with when the issue started occurring?

    I don’t know. Did WC make any such changes in an update? Certainly nobody is editing the database manually.

    Were there any recent data import/export processes or migrations that could have impacted the data integrity within the WooCommerce customer tables?

    No

    Apart from WooCommerce updates, have there been any updates to WordPress core, server software, or any other related software components that might have coincided with the emergence of this issue?

    Unfortunately, nobody remembers looking at the Customers page before, so we have no idea when it broke.

    Hi there @swinggraphics ??

    Thank you for reaching back, clarifying things further.

    As a next step, focusing on the staging instance, let’s test with the following.

    Kindly locate the wp_users table in the database, and see if the entries are all there (they should be more than 2 thousand, for customers only).

    Subsequently, take a look at the wp_usermeta table, also?– preferred billing/shipping information. WooCommerce saves the order billing/shipping information as user meta. In this way, this information will be available for future orders and a faster checkout process.

    I hope this is helpful! Please let us know if you have any further questions or concerns.
    We will be happy to help you further.

    Thread Starter swinggraphics

    (@swinggraphics)

    Kindly locate the?wp_users?table in the database, and see if the entries are all there (they should be more than 2 thousand, for customers only).

    There are 190 users with the Customer role. This feels reasonable, assuming most people check out as a guest.

    Subsequently, take a look at the?wp_usermeta?table, also?– preferred billing/shipping information. WooCommerce saves the order billing/shipping information as user meta. In this way, this information will be available for future orders and a faster checkout process.

    This needs clarification. Obviously I can’t read through all the usermeta and would not know if anything is awry even if I could. And why do we care about the billing/shipping information right now?

    Saif

    (@babylon1999)

    Hello @swinggraphics,

    The customer data in WooCommerce → Customers is stored in a dedicated table named wp_wc_customer_lookup. If you have database access, I suggest manually checking it to see if it’s empty or deleted.

    Even if the table is empty, you can regenerate it by navigating to Analytics → Settings → Delete Historical Data → Then re-import it.

    Before doing so, please increase your PHP time limit (max_execution_time) to at least 500. The current 60-second limit could cause a bottleneck. Your hosting provider can help you with this part.

    Let us know how it goes!

Viewing 15 replies - 1 through 15 (of 28 total)
  • The topic ‘Customers list “No data to display”’ is closed to new replies.