MDVA-38559: /V1/customers/search API returns an error for customers with more than one subscription
/V1/customers/search API returns an error for customers with more than one subscription. Quality patch MDVA-38559 for magento/module-newsletter applies to Magento Open Source and Adobe Commerce 2.4.0 to 2.4.2-p2.
- Categories
- Web API
- Components
- magento/module-newsletter
- Origin
- adobe-commerce-support
- Since QPT
- 1.1.15
Issue
/V1/customers/search API returns an error for customers with more than one subscription.
Steps to reproduce
1. Go to Store > Configuration > Customer > Customer Configuration > Account Sharing Options and select Global. 1. Go to Customers > All Customers, select Edit on any customer, and then select Newsletter. 1. Subscribe to a newsletter for more than one website and save the customer. 1. Send the following request: V1/customers/search?searchCriteria[filterGroups][0][filters][0][field]=email&searchCriteria[filterGroups][0][filters][0][value]=test@example.com&searchCriteria[filterGroups][0][filters][0][conditionType]=eq
Adobe's page lists 2.4.0 - 2.4.2-p2 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 MDVA-38559. On Cloud, add MDVA-38559 under stage.build.QUALITY_PATCHES in .magento.env.yaml.
For cweagans/composer-patches, choose a compatible version below and download the bundle. Copy its MDVA-38559/ 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
magento/magento2-base >=2.4.0 <2.4.3
- Patch file
- patches/os/MDVA-38559_2.4.1-p1.patch
- vendor/magento/module-newsletter/Model/Plugin/CustomerPlugin.php
- vendor/magento/module-newsletter/etc/extension_attributes.xml
