Support

Search results for ""

Sorry, no results found. Perhaps you would like to search the documentation?
All Topics
John Langlois

Number of Orders Completed Causes Collapse

I have added one field from the dropdown list, Number of Orders from WooCommerce, to the Users list.
Doing so results an empty list of Users.
I have tried it with and without the “completed orders” option.
Initially, the list populates, but when I try to sort on any field, the list collapses and cannot be recovered.

Php error log shows below. Please suggest a remedy.
Thank you.

[15-Jul-2024 16:28:28 UTC] WordPress database error Unknown column 'acsort_orders.status' in 'on clause' for query SELECT SQL_CALC_FOUND_ROWS wp448_users.ID
FROM wp448_users

LEFT JOIN wp448_wc_orders AS order_count_ac0 ON order_count_ac0.customer_id = wp448_users.ID
AND acsort_orders.status IN ( 'wc-completed' )

WHERE 1=1
GROUP BY wp448_users.ID
ORDER BY
CASE
WHEN COUNT( order_count_ac0.id ) IS null THEN 1
WHEN COUNT( order_count_ac0.id ) = 0 THEN 1
ELSE 0 END
, COUNT( order_count_ac0.id ) ASC
, wp448_users.ID ASC
LIMIT 0, 800 made by WP_Users_List_Table->prepare_items, WP_User_Query->__construct, WP_User_Query->query
[15-Jul-2024 16:28:59 UTC] WordPress database error Unknown column 'acsort_orders.status' in 'on clause' for query SELECT SQL_CALC_FOUND_ROWS wp448_users.ID
FROM wp448_users

LEFT JOIN wp448_wc_orders AS order_count_ac0 ON order_count_ac0.customer_id = wp448_users.ID
AND acsort_orders.status IN ( 'wc-completed' )

WHERE 1=1
GROUP BY wp448_users.ID
ORDER BY
CASE
WHEN COUNT( order_count_ac0.id ) IS null THEN 1
WHEN COUNT( order_count_ac0.id ) = 0 THEN 1
ELSE 0 END
, COUNT( order_count_ac0.id ) ASC
, wp448_users.ID ASC
LIMIT 0, 800 made by WP_Users_List_Table->prepare_items, WP_User_Query->__construct, WP_User_Query->query
[15-Jul-2024 16:29:14 UTC] WordPress database error Unknown column 'acsort_orders.status' in 'on clause' for query SELECT SQL_CALC_FOUND_ROWS wp448_users.ID
FROM wp448_users

LEFT JOIN wp448_wc_orders AS order_count_ac0 ON order_count_ac0.customer_id = wp448_users.ID
AND acsort_orders.status IN ( 'wc-completed' )

WHERE 1=1
GROUP BY wp448_users.ID
ORDER BY
CASE
WHEN COUNT( order_count_ac0.id ) IS null THEN 1
WHEN COUNT( order_count_ac0.id ) = 0 THEN 1
ELSE 0 END
, COUNT( order_count_ac0.id ) ASC
, wp448_users.ID ASC
LIMIT 0, 800 made by WP_Users_List_Table->prepare_items, WP_User_Query->__construct, WP_User_Query->query
[15-Jul-2024 16:29:28 UTC] WordPress database error Unknown column 'acsort_orders.status' in 'on clause' for query SELECT SQL_CALC_FOUND_ROWS wp448_users.ID
FROM wp448_users

LEFT JOIN wp448_wc_orders AS order_count_ac0 ON order_count_ac0.customer_id = wp448_users.ID
AND acsort_orders.status IN ( 'wc-completed' )

WHERE 1=1
GROUP BY wp448_users.ID
ORDER BY
CASE
WHEN COUNT( order_count_ac0.id ) IS null THEN 1
WHEN COUNT( order_count_ac0.id ) = 0 THEN 1
ELSE 0 END
, COUNT( order_count_ac0.id ) ASC
, wp448_users.ID ASC
LIMIT 0, 800 made by WP_Users_List_Table->prepare_items, WP_User_Query->__construct, WP_User_Query->query

 

8 months, 1 week ago
Tobias Schutter
Developer

Hi John, thank you for bringing this to our attention. This is a bug and we’ll make sure to have it fixed in the next release.

To resolve the empty list of users, you can simply click on the “reset sorting” button on top of the list table. Or go to Dashboard > Admin Columns > Settings and click on “reset sorting” there.

8 months ago

You must be logged in to reply to this topic.