Closed
Description
Preconditions
- Magento 2.1.1
- I have product attribute of the type 'dropdown', which name is 'Afmetingen uitwendig (BxDxH) in mm' and it's code is 'afmetingen_uitwendig'.
Steps to reproduce
- Add a couple of options
- Save the attribute
- Add a couple of options more
- Re-save the attribute
Expected result
- Options should be added
- No errors should be shown
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 field attribute_code
is missing here, thus Magento will generate a new attribute code.
The solution in my opinion is to change disabled="disabled"
to readonly="readonly"
. This makes sure the field isn't editable, but it's value is still submitted.
Metadata
Metadata
Assignees
Labels
The issue has been fixed in 2.1 release lineThe issue has been fixed in 2.2 release lineThe issue has been fixed in 2.3 release lineGate 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