• Resolved Rhand

    (@rhand)


    Fresh installation of WordPress and WooCommerce + WPML made yesterday. Did a Dashboard re-installation as I had

    
    [02-Jul-2019 04:03:40 UTC] PHP Warning:  Invalid argument supplied for foreach() in /home/user/domains/domain.com/public_html/staging/wp-admin/includes/ajax-actions.php on line 3299
    

    and that issue seems to have been WordPress repo related so fine now. Site is working well too. I can check the orders page which has no orders as this was just set up but no issue. I do get this error however:

    
    [02-Jul-2019 08:04:42 UTC] WordPress database error Table '1111.wp_wc_order_stats' doesn't exist for query SELECT COUNT(*) FROM (
    SELECT wp_wc_order_stats.order_id
    FROM wp_wc_order_stats
    WHERE1=1
    AND wp_wc_order_stats.date_created <= '2019-07-02 08:04:42' 
    AND wp_wc_order_stats.date_created >= '2019-06-25 08:04:42'
    AND (wp_wc_order_stats.status IN ( 'wc-processing','wc-on-hold' ))
    ) 
    AS tt 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,
    WC_Admin_REST_Reports_Orders_Controller->get_items,
    WC_Admin_Reports_Orders_Query->get_data, WC_Data_Store->__call,
    WC_Admin_Reports_Orders_Data_Store->get_data
    

    And yes, this table does not exist. Any ideas what is going on here? Why didn’t it get created and how should I deal with this? When I checked https://github.com/woocommerce/woocommerce/wiki/Database-Description it seems this table is not needed / standard..

    • This topic was modified 4 years, 9 months ago by Rhand.
    • This topic was modified 4 years, 9 months ago by Rhand.
    • This topic was modified 4 years, 9 months ago by Rhand.
    • This topic was modified 4 years, 9 months ago by Rhand.
    • This topic was modified 4 years, 9 months ago by Rhand.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Rynald0s.a11n

    (@rynald0s)

    Automattic Happiness Engineer

    Hi @rhand!

    Disable and then immediately re-enable WooCommerce core, to see if it rebuilds the table.

    Cheers!

    Thread Starter Rhand

    (@rhand)

    Just did and I still do not see wp__wc_order_stats. WC Admin plugin was deactivated still. When I activated it I did not get this table back either.

    I’ve tried creating the table manually from $tables in class-wc-admin-install.php. When I do this, I get this MySQL error:

    Index column size too large. The maximum column size is 767 bytes.

    I’m running MariaDB 10.1.4 on this server.

    I ran the following query, then tried creating the table again. This time it worked:

    SET GLOBAL innodb_default_row_format = 'DYNAMIC';

    Thread Starter Rhand

    (@rhand)

    @millionleaves I will check out this option this week. Do hope WooCommerce will come with a solution soon though where we do not need these Database tweaks..

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘wp_wc_order_stats’ doesn’t exist for query SELECT COUNT’ is closed to new replies.