-
Notifications
You must be signed in to change notification settings - Fork 248
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
cannot fix/save sku of product with trailing space #3413
Comments
Hi @medigeek. Thank you for your report. Join Magento Community Engineering Slack and ask your questions in #github channel. |
Add this code in NoSpaceBeforeAndAfterString.php file if ($trimValue !== $value) {
|
Preconditions (*)
Steps to reproduce (*)
The issue happens when you already have products pre-existing before the magento inventory leading/trailing space validation check.
The validation system doesn't allow you to change/fix product skus with pre-existing products with space characters.
Model/Validators/NoSpaceBeforeAndAfterString.php
Model/Validators/NoSpaceBeforeAndAfterString.php
Expected result (*)
Actual result (*)
While saving you see the error:
The stock item was unable to be saved. Please try again.
In the logs this error comes up:
Validation Failed: "sku" can not contain leading or trailing spaces.
The text was updated successfully, but these errors were encountered: