Skip to content

SKU values are not trimmed with the space. #12300

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

Closed
ShaileshChauhan92 opened this issue Nov 16, 2017 · 8 comments
Closed

SKU values are not trimmed with the space. #12300

ShaileshChauhan92 opened this issue Nov 16, 2017 · 8 comments
Labels
Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release

Comments

@ShaileshChauhan92
Copy link

ShaileshChauhan92 commented Nov 16, 2017

Preconditions

  1. SKU accepts the value with space at end at starting of the value. They are not validated while importing products by CSV.

Steps to reproduce

Expected result

  1. SKU should be trimmed while importing into the database.

Actual result

  1. [Screenshot, logs]
    Two duplicates SKU are created with same name.
@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Nov 16, 2017
@magento-engcom-team
Copy link
Contributor

@ShaileshChauhan92, thank you for your report.
We've created internal ticket(s) MAGETWO-84007 to track progress on the issue.

@magento-engcom-team magento-engcom-team added 2.1.x Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed labels Nov 16, 2017
@p-bystritsky p-bystritsky self-assigned this Dec 12, 2017
@p-bystritsky
Copy link
Contributor

p-bystritsky commented Dec 13, 2017

Preconditions

  1. Magento 2

Steps to reproduce

  1. Create a product with sku 'test', save it.
  2. Create a product with sku '   test    ', save it.

Expected result

  1. Product is saved with sku '   test    '.

Actual result

  1. Product is saved with sku 'test-1'.

Problem is caused by sku uniqueness check. It trims whitespaces before executing the database request.

$bind = [
'attribute_id' => $attribute->getId(),
'value' => trim($value),
];

@p-bystritsky p-bystritsky removed their assignment Dec 13, 2017
@dimaperedriy
Copy link

#mageconf

@dimaperedriy dimaperedriy removed the Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release label Dec 15, 2017
@dimaperedriy
Copy link

Steps from original bug message can`t reproduce on magento 2.2-develop branch.

@PieterCappelle
Copy link
Contributor

I think this correct behaviour and I can’t reproduce in 2.2 or 2.3.

@ishakhsuvarov
Copy link
Contributor

@ShaileshChauhan92 Closing per multiple comments abount the issue not being reproducible.
Please clarify the steps and reopen if you still experiencing problems.

@sidolov sidolov added the Fixed in 2.3.x The issue has been fixed in 2.3 release line label Oct 27, 2018
@sidolov
Copy link
Contributor

sidolov commented Oct 27, 2018

Hi @ShaileshChauhan92. Thank you for your report.
The issue has been fixed in #18019 by @bartoszkubicki in 2.3-develop branch
Related commit(s):

The fix will be available with the upcoming 2.3.1 release.

@magento-engcom-team
Copy link
Contributor

Hi @ShaileshChauhan92. Thank you for your report.
The issue has been fixed in #18862 by @gelanivishal in 2.2-develop branch
Related commit(s):

The fix will be available with the upcoming 2.2.8 release.

@magento-engcom-team magento-engcom-team added the Fixed in 2.2.x The issue has been fixed in 2.2 release line label Oct 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
None yet
Development

No branches or pull requests

8 participants