Skip to content

catalogProductTierPriceManagementV1 DELETE and POST operation wipes out media gallery selections when used on store code "all".  #10797

Closed
@dfelton

Description

@dfelton

Preconditions

  1. Magento 2.1.8 EE

Steps to reproduce

  1. Install Magento 2.1.8
  2. Create a new product with a SKU "foobar", make sure to upload at least 1 product image and select it as the Base Image, Small Image, Thumbnail Image, lastly, also make sure to give it a tier price. For this example Lets say a tier price for a Qty of 3, All groups (price amount doesn't matter).
  3. Navigate to System -> Integration and create a new Integration with full access.
  4. With our new integration, make a curl request to delete the tier price, using the store code all (NOT default, that works just fine).

Example:

curl -X DELETE "http://magento2.1.8.localhost/rest/all/V1/products/foobar/group-prices/all/tiers/3"   -H "Content-Type:application/json" -H "Authorization: Bearer uj36s49yvgejtg4j0hwuq3q2o1iwsr9u"

Expected result

  1. The tier price for a quantity of 3 should be deleted from the product, and nothing else.

Actual result

  1. The tier price for a quantity of 3 is deleted from the product, AND all the image selections for the product are deleted as well. (Images are still part of the product's image gallery, but the selections are lost).

Additional Info

  • Further tests show that the POST operation for this API endpoint has the same issue. /rest/all/ will wipe out a product's image selections whereas /rest/default does not.

Metadata

Metadata

Assignees

Labels

Fixed in 2.2.xThe issue has been fixed in 2.2 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for development

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions