M2.1.1 : Re-saving a product attribute with a different name than it's code results in an error #6770
Labels
bug report
Component: Catalog
Fixed in 2.1.x
The issue has been fixed in 2.1 release line
Fixed in 2.2.x
The issue has been fixed in 2.2 release line
Fixed in 2.3.x
The issue has been fixed in 2.3 release line
Issue: Clear Description
Gate 2 Passed. Manual verification of the issue description passed
Issue: Confirmed
Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed
Issue: Format is valid
Gate 1 Passed. Automatic verification of issue format passed
Issue: Ready for Work
Gate 4. Acknowledged. Issue is added to backlog and ready for development
Reproduced on 2.1.x
The issue has been reproduced on latest 2.1 release
Reproduced on 2.2.x
The issue has been reproduced on latest 2.2 release
Reproduced on 2.3.x
The issue has been reproduced on latest 2.3 release
Preconditions
Steps to reproduce
Expected result
Actual result
Upon re-saving, Magento tries to re-create the attribute code:
As you can see, it seems that the existing attribute code is ignored. Further inspection of the form confirms this:
The problem here is obvious: setting the form to
disabled="disabled"
disables the form value from submitting. You can check this in the form data send in the request. The fieldattribute_code
is missing here, thus Magento will generate a new attribute code.The solution in my opinion is to change
disabled="disabled"
toreadonly="readonly"
. This makes sure the field isn't editable, but it's value is still submitted.The text was updated successfully, but these errors were encountered: