-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Closed
Copy link
Labels
Area: AccountComponent: CustomerIssue: 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 CreatedIndicates that Pull Request has been created to fix issueIndicates that Pull Request has been created to fix issueProgress: PR in progressProgress: doneReported on 2.4.7-p3Indicates 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 and environment
- Magento version: tested on 2.4.7-p3.
- Copypasteble 31 "ö" characters for convenience: ööööööööööööööööööööööööööööööö
Steps to reproduce
- In admin go to Customer->Customer Groups.
- Click "Add New Customer Group"
- Input 31 "ö" characters as the group name:

- Click "Save Customer Group".
Expected result
A customer group with code "ööööööööööööööööööööööööööööööö" is created.
Actual result
A customer group with code "öööööööööööööööö" (16 characters) is created.
Additional information
The issue is most likely in these two places:
| $this->setCode(substr($this->getCode(), 0, self::GROUP_CODE_MAX_LENGTH)); |
| $group->setCode(substr($group->getCode(), 0, $group::GROUP_CODE_MAX_LENGTH)); |
There we are using the substr function instead of mb_substr. I see no issue with using mb_substr as the database can handle 32 multibyte characters fine.
Release note
No response
Triage and priority
- 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: AccountComponent: CustomerIssue: 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 CreatedIndicates that Pull Request has been created to fix issueIndicates that Pull Request has been created to fix issueProgress: PR in progressProgress: doneReported on 2.4.7-p3Indicates 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