You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
disable/comment out the validation check in Model/Validators/NoSpaceBeforeAndAfterString.php
create a product with trailing space character
re-enable the validation check in Model/Validators/NoSpaceBeforeAndAfterString.php
try to modify/remove the space from the sku of the product and save
Expected result (*)
expecting successful product save
successfully able to change the leading/trailing space characters
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:
Hi @medigeek. Thank you for your report.
To speed up processing of this issue, make sure that you provided sufficient information.
Add a comment to assign the issue: @magento I am working on this
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: