Description
Trying to search for an order using something else than GUID triggers an error. The error happened on PostgreSQL.
Steps to reproduce:
- Login as admin
- Go to Commerce -> Orders
- Enter any text in the search field (like "order")
Expected:
Search results are displayed
Actual:
SQL error:
An exception has been thrown during the rendering of a template ("An exception occurred while executing 'SELECT COUNT(ibexa_order.id) FROM ibexa_order LEFT JOIN ibexa_order_buyer_company_assignment ibexa_order_buyer_company_assignment ON ibexa_order.id = ibexa_order_buyer_company_assignment.order_id LEFT JOIN ibexa_order_buyer_user_assignment ibexa_order_buyer_user_assignment ON ibexa_order.id = ibexa_order_buyer_user_assignment.order_id LEFT JOIN ibexa_order_currency_assignment ibexa_order_currency_assignment ON ibexa_order.id = ibexa_order_currency_assignment.order_id LEFT JOIN ibexa_order_value ibexa_order_value ON ibexa_order.id = ibexa_order_value.order_id LEFT JOIN ibexa_order_buyer_company ibexa_order_buyer_company ON ibexa_order_buyer_company_assignment.assignment_company_id = ibexa_order_buyer_company.id LEFT JOIN ibexa_order_buyer_user ibexa_order_buyer_user ON ibexa_order_buyer_user_assignment.assignment_user_id = ibexa_order_buyer_user.id LEFT JOIN ibexa_order_currency ibexa_order_currency ON ibexa_order_currency_assignment.assignment_currency_id = ibexa_order_currency.id WHERE (ibexa_order.identifier = ?) OR (ibexa_order_buyer_company.company_name LIKE ?) OR (ibexa_order_buyer_user.user_name LIKE ?)' with params ["order", "%order%", "%order%"]: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for type uuid: "order"").