validation issue with async bulk api when sending products with missing attributes #39527
Open
1 of 5 tasks
Labels
Reported on 2.4.6-p8
Indicates original Magento version for the Issue report.
Preconditions and environment
files:
Steps to reproduce
Send 2 product via async/bulk/V1/products: for example:
[ { "product": { "sku": "existing sku", "type_id": "simple", "created_at": null, "updated_at": null, "custom_attributes": [ { "attribute_code": "cost", "value": "201.96" } ] } }, { "product": { "sku": "new sku", "type_id": "simple", "created_at": null, "updated_at": null, "custom_attributes": [ { "attribute_code": "cost", "value": "28.65" } ] } } ]
The existing product needs to have an custom attribute set. The second will fallback on the default. When the first is handled the custom attribute set is loaded by $productAttributes = $product->getAttributes(); in the ProductRepository after the validation is done. Then when the 2nd product is handled the attribute set which is diffirent from the first one, is not loaded and when checking if the attribute set id is on the attribute it fails and then the attribute is not applicable and is not handled by the validation.
Expected result
Products with missing data for required attributes are not created
Actual result
products with missing data are being created
Additional information
No response
Release note
No response
Triage and priority
The text was updated successfully, but these errors were encountered: