ACSD-65913: OpenSearch throws an illegal_argument_exception for categories with products having the same price
The ACSD-65913 patch fixes the issue where OpenSearch threw an illegal_argument_exception for categories with products having the same price. This patch is available when the Quality Patches Tool (QPT) 1.1.66 is installed. The patch ID is ACSD-65913. Please note that this issue is scheduled to be fixed in Adobe Commerce 2.4.9.
Affected products and versions
The patch is created for Adobe Commerce version:
- Adobe Commerce (all deployment methods) 2.4.7-p5
Compatible with Adobe Commerce versions:
- Adobe Commerce (all deployment methods) 2.4.7 - 2.4.8
magento/quality-patches package to the latest version and check the compatibility on the Quality Patches Tool: Search for patches page. Use the patch ID as a search keyword to locate the patch.Issue
OpenSearch throws an illegal_argument_exception ([from] parameter cannot be negative) when loading categories in which all products shared the same price.
Steps to reproduce:
-
Install OpenSearch version 2.19.1 and set it as the default search engine.
-
Configure the Price product attribute to be visible in Layered Navigation:
- Visible in Advanced Search: Yes
- Comparable on Storefront: Yes
- Use in Layered Navigation: Filterable (with results)
-
Go to Stores > Configuration > Catalog > Catalog > Layered Navigation. Set Price Navigation Step Calculation to Automatic (equalize product counts).
-
Create a category with six products that all have the same price:
- SKU: product_super_0-1-1-1, Price: $150
- SKU: product_super_0-1-1, Price: $48
- SKU: product_super_0-1, Price: $48
- SKU: product_super_0, Price: $48
- SKU: product_super_0-1-1-1-1-1-1-1-1-1-1-1-1-1, Price: $48
- SKU: product_super_0-1-1-1-1-1-1-1-1-1-1, Price: $48
-
Run the following command:
bin/magento indexer:reindex -
Open the category page. You’ll see an error:
[from] parameter cannot be negative, found [-1]
Expected results:
OpenSearch should not throw an illegal_argument_exception when all products in a category have the same price.
Actual results:
-
OpenSearch throws an
illegal_argument_exceptionwith the message:
[from] parameter cannot be negative, found [-1] -
The
var/log/exception.logfile contains:code language-text [2025-05-14T22:39:33.595272+00:00] report.CRITICAL: OpenSearch\Common\Exceptions\BadRequest400Exception: {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"[from] parameter cannot be negative, found [-1]"}],"type":"illegal_argument_exception","reason":"[from] parameter cannot be negative, found [-1]"},"status":400}
Apply the patch
To apply individual patches, use the following links depending on your deployment method:
- Adobe Commerce or Magento Open Source on-premises: Quality Patches Tool > Usage in the Quality Patches Tool guide.
- Adobe Commerce on cloud infrastructure: Upgrades and Patches > Apply Patches in the Commerce on Cloud Infrastructure guide.
Related reading
To learn more about Quality Patches Tool, refer to:
- Quality Patches Tool: A self-service tool for quality patches in the Tools guide.