QUALITY PATCH

ACSD-57846: Filtering products for price from zero in a GraphQL products search leads to a malformed…

Filtering products for price from zero in a GraphQL products search leads to a malformed request to OpenSearch and does not return any results. Quality patch ACSD-57846 for magento/module-elasticsearch applies to Magento Open Source and Adobe Commerce 2.4.2 to 2.4.6-p15.

Categories
Catalog Search, GraphQL
Components
magento/module-elasticsearch
Origin
adobe-commerce-support
Since QPT
1.1.49

Issue

Filtering products for price from zero in a GraphQL products search leads to a malformed request to OpenSearch and does not return any results.

Steps to reproduce

1. Create a category with two simple products: * simple1 - price $0 * simple2 - price $10 1. Make sure that both the products are visible on the frontend. 1. Send a request with price:{from:"1"}. query { products( pageSize: 50 currentPage: 1, filter: {price:{from:"1"}} ) { totalResult: total_count productItems: items { sku urlKey: url_key price: price_range { fullPrice: minimum_price { finalPrice: final_price { currency value } } } } } } 1. This returns the product, simple2. 1. Now send a request with price:{from:"0"}. query { products( pageSize: 50 currentPage: 1, filter: {price:{from:"0"}} ) { totalResult: total_count productItems: items { sku urlKey: url_key price: price_range { fullPrice: minimum_price { finalPrice: final_price { currency value } } } } } }

Adobe's page lists 2.4.2 - 2.4.6-p7 as compatible; the versions below are resolved from the current QPT constraints and are the ones the tool will offer.

Install

Install the Quality Patches Tool with composer require magento/quality-patches, apply the prerequisites listed for all files applicable to your distribution and version first, then run vendor/bin/magento-patches apply ACSD-57846. On Cloud, add ACSD-57846 under stage.build.QUALITY_PATCHES in .magento.env.yaml.

For cweagans/composer-patches, choose a compatible version below and download the bundle. Copy its ACSD-57846/ folder into patches/composer/, merge composer.patches.json into composer.json, then run composer install. Bundle prerequisites the same way and list them first. Paths are relative to each package root, using the default -p1 level. Prefer local files when configuring composer-patches; a remote URL can change.

Patch files and compatible versions

Packages across compatible versions (1): magento/module-elasticsearch
Packages across compatible versions (1): magento/module-elasticsearch

Sources

Łukasz Bajsarowicz
Built by

Łukasz Bajsarowicz, e-commerce architect

Magento and Adobe Commerce architecture, upgrades, performance and audits for merchants and agencies since 2015; magento.watch is the tooling I use on those projects.

Open source, maintained on weekends.