-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Open
Labels
Area: APIsComponent: ApiUse with concrete module component label E.g. "Component: Api" + "Catalog"Use with concrete module component label E.g. "Component: Api" + "Catalog"Issue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.A defect with this priority could have functionality issues which are not to expectations.Progress: PR in progressReported on 2.4.2Indicates original Magento version for the Issue report.Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchThe issue has been reproduced on latest 2.4-develop branch
Description
Preconditions (*)
- Magento 2.4.2
- Nothing else needs to be installed
Steps to reproduce (*)
- Go to backend
- Open Stores -> Attribute -> Product
- Click "Add New Attribute"
- Enter arbitrary value in "Default Label"
- Under "Advanced Attribute Properties" enter an "Attribute Code" that contains an upper case letter, e.g. "Test_Attribute"
- Hit save (works!)
- Setup Rest-API and send a request to create a product attribute with an attribute code that has uppercase letters, e.g. "Test_Attribute2" (see sample script below)
- Check response:
"message":"Invalid value of ""%value"" provided for the %fieldName field.","parameters":{"fieldName":"attribute_code","value":"Test_Attribute2"}
Sample bash script for verification (replace baseurl and username/password)
BASE_URL='http://localhost/'
TOKEN=$(curl -X POST "${BASE_URL}index.php/rest/V1/integration/admin/token" \
-H "Content-Type:application/json" \
-d '{"username":"admin", "password":"password123"}')
TOKEN=$(echo $TOKEN | sed "s/\"//g");
curl -X POST "${BASE_URL}index.php/rest/V1/products/attributes" \
-H "authorization: Bearer ${TOKEN}" \
-H 'content-type: application/json' \
-d '{
"attribute": {
"attribute_code": "branding_Tester4",
"default_frontend_label": "Testing",
"frontend_input": "text"
}
}'
Expected result (*)
- I expect that I can create the same kind of product attributes through backend and Rest-API
- I expect that I can use uppercase letters in attribute codes when creating product attributes through backend and frontend.
- I expect that backend and rest api work similarly in creating product attributes.
Actual result (*)
- I can create product attributes with uppercase letters in attribute_code through backend.
- I cannot create product attributes with uppercase letters in attribute_code through Rest API.
- Backend and rest api do not work similarly in creating product attributes in regards to attribute_code.-
Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Metadata
Metadata
Assignees
Labels
Area: APIsComponent: ApiUse with concrete module component label E.g. "Component: Api" + "Catalog"Use with concrete module component label E.g. "Component: Api" + "Catalog"Issue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.A defect with this priority could have functionality issues which are not to expectations.Progress: PR in progressReported on 2.4.2Indicates original Magento version for the Issue report.Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchThe issue has been reproduced on latest 2.4-develop branch
Type
Projects
Status
Pull Request In Progress