- 🇺🇸United States erutan
I've come across the same issue in a standard table and a table using aggregation. I have a very simple math field "outstanding" (amount - paid) that it'd be nice to sort by since most of them are 0. No pagination. I get the following error on Drupal 9.5.10 and 3.0.1 of this field. I'm using storage (contrib) entity types but I'm not sure why that would impact things.
The website encountered an unexpected error. Please try again later. Drupal\Core\Database\DatabaseExceptionWrapper: Exception in Purchase Order - Invoices[purchase_order_invoices]: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'field_views_simple_math_field' in 'order clause': SELECT "storage_field_data"."id" AS "id" FROM "storage_field_data" "storage_field_data" WHERE ("storage_field_data"."status" = :db_condition_placeholder_0) AND ("storage_field_data"."type" IN (:db_condition_placeholder_1)) ORDER BY "field_views_simple_math_field" ASC; Array ( [:db_condition_placeholder_0] => 1 [:db_condition_placeholder_1] => wildlife_purchase_order ) in main() (line 19 of index.php).