Skip to content

Product configuration creator does not warn about invalid SKUs #11953

@JanisE

Description

@JanisE

Product configuration creator does not warn about invalid SKUs before attempting to save/create the configuration products, thus losing the product configurations set up.

Preconditions

  1. Magento CE 2.2.0 with sample data is installed by Composer.

Steps to reproduce

  1. In Admin go to Stores -> Attributes -> Product -> Add New Attribute
  2. Create an attribute with input type "Text Swatch" and values "Base" and "With Free Storage Kit" (sufficiently long).
  3. In Admin go to: Catalog -> Products -> Add Product
  4. Set name to "Sony Alpha a7R III Mirrorless Digital Camera (Body only)" e.i. something sufficiently long, near 64 characters, which is the limit for SKU field.
  5. Leave the SKU as automatically filled (the same as the name).
  6. (If you would append " (With Free Storage Kit)" to the name, the SKU field would appear red/invalid warning about the maximum length of 64 characters.)
  7. Save the product.
  8. Open that same product and click on "Create Configurations".
  9. Choose the attribute that was just created and "Next".
  10. Select both swatch values and "Next".
  11. Select whatever images, price, quantity and "Next".
  12. Click on "Generate Products".

Expected result

  1. There should be warnings about invalid (too long) SKUs.
  2. "Save" button would not work unless the (automatically generated from name + text swatch value) SKUs are edited to be valid (shortened).

Actual result

  1. There are no warnings about invalid SKUs.
  2. Clicking "Save" refreshes the page (losing the unsaved configurations).
  3. Error message 'Product with SKU " Sony Alpha a7R III Mirro -With Free Storage Kit-With Free Storage Kit" does not exist' is displayed.

Metadata

Metadata

Assignees

Labels

Fixed in 2.2.xThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions