cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to create new options via REST if one already exists with different letter case

Unable to create new options via REST if one already exists with different letter case

I work with a customer who is not great at standardizing their color options letter case, so occasionally they will add a product with a color that already exists with different letter case. Previously, we would simply treat these as new color options and create new ones. The API never complained about this. However, after the customer updated Magento to 2.4.3, The api started returning the below error. Does anyone know if this validation can be removed, or modified? Case sensitivity DOES matter in the option, in my opinion, so it doesn't make sense for the API to call this a duplicate when the case is different.

 

POST: {{baseUrl}}/V1/products/attributes/:attributeCode/options

Request: {"option": {"label": "Poppy Red"}}

Response{"message""Admin store attribute option label \"%1\" is already exists.","parameters": ["Poppy Red"]}

 

This is the value that "exists," even though I don't agree that this is the same value.

{"label""POPPY RED","value""6018"}
 
If you create the color via the Magento UI, there is no complain whatsoever. Even if you create a direct duplicate, the UI will not complain.