Closed
Description
Saving a loaded product via the ProductRepository updates attribute values of unchanged attributes. Even loading a product and saving it without making changes can lead to a product no longer using default values for a store.
Preconditions
- Magento 2.1.3
- Single store mode is disabled
Steps to reproduce
- Create a simple product
- Make sure this product uses default value for product name (or other attributes) for default store
- Load product in a backend controller via getById($productId) method of ProductRepositoryInterface
- Save the loaded product via save($product) method of ProductRepositoryInterface
Expected result
- No attribute value of the product should have changed. Especially the product name in store 1 should still use the default value
Actual result
- The name of the save product is copied from store 0 to store 1 and store 1 no longer uses the default value for the product name
Attached is a sample module that provides a backend controller that loads product with id 1 and saves it without changing an attribute.
ProductSave.zip
Metadata
Metadata
Assignees
Labels
Gate 2 Passed. Manual verification of the issue description passedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 1 Passed. Automatic verification of issue format passedGate 4. Acknowledged. Issue is added to backlog and ready for developmentThe issue has been reproduced on latest 2.1 releaseThe issue has been reproduced on latest 2.2 releaseThe issue has been reproduced on latest 2.3 release