[PaaS only]{class="badge informative" title="Applies to Adobe Commerce on Cloud projects (Adobe-managed PaaS infrastructure) and on-premises projects only."}

Error when filtering orders in the Admin

This article provides a patch for the Adobe Commerce issue where an error occurs when attempting to filter orders in the Admin by date, displaying the message: Integrity constraint violation: 1052 Column ‘created_at’ where clause is ambiguous.

Affected versions

  • Adobe Commerce (all deployment methods) 2.4.4 - 2.4.7

Issue

Filtering orders in the Admin by date returns an error.

The exception.log shows:

report.CRITICAL: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'created_at' in where clause is ambiguous in /path/to/magento/vendor/magento/framework/DB/Statement/Pdo/Mysql.php:90

Steps to reproduce:

  1. Go to Admin > Sales > Orders.

    • Set Purchase Date Ascending order in grid, OR
    • Set Purchase Date Filter in filters.
  2. An error appears: Something went wrong with processing the default view and we have restored the filter to its original state.

Cause

There is an issue with the PayPal Braintree modules.

Solution

To solve the issue, apply the patch attached to this article. To download it, scroll down to the end of the article and click the file name, or click the following link:

bundle_3357_filter_order_in_admin_by_date_patch.zip

The patch is compatible with all affected versions and editions.

How to apply the patch

For instructions, see How to apply a composer patch provided by Adobe in the support knowledge base.

recommendation-more-help
8bd06ef0-b3d5-4137-b74e-d7b00485808a