Skip to content

FIX whitespaces possible in product sku #18417

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
wants to merge 4 commits into from
Closed

FIX whitespaces possible in product sku #18417

wants to merge 4 commits into from

Conversation

wstnbrg
Copy link

@wstnbrg wstnbrg commented Oct 6, 2018

Description

Set trimmed sku (provided by post request) in Magento\Catalog\Controller\Adminhtml\Product\Save on line 131 to prevent whitespaces in sku like the autogenerate function does.

Fixed Issues (if relevant)

  1. Trim whitespace on SKU when saving product #16572: Trim whitespace on SKU when saving product

Manual testing scenarios

  1. Added a product from Backend with a sku with whitespaces at beginning and end
  2. Saved a product from Backend with a sku with whitespaces at beginning and end
  3. ran "php bin/magento dev:tests:run" from Magento Root/Install dir

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@magento-cicd2
Copy link
Contributor

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Henning Westenberg seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.

@josefbehr
Copy link
Contributor

@wstnbrg Thank you for your contribution. Can you please check why the integration tests are failing? In the best case, you could also provide new tests for the sku.

moving trim into helper
@sidolov
Copy link
Contributor

sidolov commented Oct 31, 2018

Hi @wstnbrg , looks like you made some commits with email different than in your GitHub profile, please, add email from commits to your profile!
Thank you!

@sivaschenko
Copy link
Member

Closed due to inactivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants