-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Magento REST API : Configurable product with product links provided: "same set of attribute values" error #39534
Comments
Hi @JoryHogeveen. Thank you for your report.
Join Magento Community Engineering Slack and ask your questions in #github channel. |
I've done some digging in the code and what happens in the response and I think I've found the issue. It seems that the contents of Note that I did not pass the I verified this behavior by adjusting my API call to always include the config and yep, the update now works! Of course I might have misinterpreted the documentation, but I was under the impression that you only need to produce the options when creating a configurable product, not when updating, Hopefully somebody can provide some more insights on the inner workings of these endpoints. Since there now is a workaround, I've changed the severity to S1 |
Hi @engcom-Hotel. Thank you for working on this issue.
|
Hello @JoryHogeveen, Thanks for the report and collaboration! We request you to please provide the rest API for which you are facing this issue. Thanks |
I was using the main Please also read my latest comment in where I've found the actual cause. Steps:
Example for the second update call: {
"product": {
"sku": "Your sku",
"extension_attributes": {
"configurable_product_links": [
child_product_id_1,
child_product_id_2,
child_product_id_3
]
}
}
} Since the configurable option is already made at this point I would assume that Magento would autofill in the new attribute values from the product links. However, this does not happen. Instead, you are required to provide the whole The reason I assume that this would not be needed is because of three reasons:
Please let me know your thoughts about my assessment here. |
Hello @JoryHogeveen, Thanks for the response! We have tried to reproduce the issue in the latest 2.4-develop branch but the issue is not reproducible for us. We have followed the below dev docs to create the configurable product through the rest API: https://developer.adobe.com/commerce/webapi/rest/tutorials/configurable-product/ We can create products successfully. Please let us know if we missed anything. Thanks |
Thank you for your reply! I could reproduce this consistently but case you still cannot reproduce: I'm on my phone right now and will revisit this when I'm back from holiday at the end of this month. Thank you! |
Hello @JoryHogeveen, Thanks for the reply! We have tried to update the same configurable product via the below endpoint:
And we can reproduce the issue. Please refer to the below screenshot for reference: Hence we are confirming the issue. I suggest you to create a community PR with the fix of this issue. We will be happy to process it further. Thanks |
✅ Jira issue https://jira.corp.adobe.com/browse/AC-13742 is successfully created for this GitHub issue. |
✅ Confirmed by @engcom-Hotel. Thank you for verifying the issue. |
Preconditions and environment
Steps to reproduce
To be honest, I'm not sure how to reproduce this properly. There are cases where this happens and there are cases where it doesn't.
There are two related topics, both resulted in no further actions even though there are definitely cases where this occurs:
#33937
#16349
In my case I'm using the REST API to provide the linked product ID's.
The products that run into errors are validated several times and I can 100% confirm that these use different attribute values.
I also verified that the attribute value ID's are not even remotely similar (eg. 1456 vs 65 etc.) so some string comparison bug couldn't really be the issue here.
Another possibly important thing to note here is that the configurable product I tested against already exists in Magento.
Also, all these children (product links) are already linked to this product as well!
This REST API call is done in a loop which combines many product updates which could by anything. In this case there is no real change in the product links but since it's part of the update it is still send.
EDIT: Also not that when I add the child products manually through the Magento Admin interface I do not get the same error!
EDIT 2: I also verified the actual product results through the REST API and confirmed the attribute value IDs are not the same.
Expected result
Created product with links between parent and children products without exception.
Actual result
Got an exception, example:
"{"message":"Products \"%1\" and \"%2\" have the same set of attribute values.","parameters":[3155,3172]}"
Note:
Product 3155 has attribute value ID "1487"
Product 3172 has attribute value ID "45"
Additional information
Not sure if this would be relevant but these attributes have a LOT of option values, like about 500 options to choose from.
There are several other attributes as well (not used for configurations though) so the total number of attribute option IDs from different attributes is about 2000.
Release note
I've marked this as S0 since there is currently no way of going around this. It's simply not updating.
Triage and priority
The text was updated successfully, but these errors were encountered: