Step to reproduce : add a new product type
check "Automatically Generate SKU" checkbox, fill the "SKU Pattern" with something, uncheck "Automatically Generate SKU" , click on save product : there is a control that checks the pattern is correct but in our case we decided not to "Automatically Generate SKU" -> so there is no need to check ?

to solve this, you have to check again ,remove what you typed in in "SKU Pattern", and uncheck to allow creation of a new product type.

Comments

jacks0_0’s picture

Title: Automatically Generate SKU options are still checked even if not checked » Can't disable or change setting of auto SKU
Version: 7.x-2.0-beta2 » 7.x-2.x-dev

I can't change the setting of auto SKU such as hide the SKU field or disable automatically generate SKU. Please fix it. Thank you.

bojanz’s picture

Assigned: Unassigned » vasike

If you want to disable autosku, you need to delete the pattern first, then uncheck the "Automatically Generate SKU" checkbox, then submit the form.

This is a Commerce AutoSKU bug. There should be additional code that clears the pattern when the checkbox is unchecked.

bojanz’s picture

Title: Can't disable or change setting of auto SKU » [AutoSKU] Can't uncheck "Automatically Generate SKU" without emptying the pattern field first

Retitling.

vasike’s picture

Status: Active » Needs review

It seems that this Commerce AutoSKU bug was fixed in the last dev.
Should we use the dev version for Kickstart or should we ask for a new release of this module.

Question: Is it ok to delete the SKU Pattern when the AutoSKU is disabled or should be kept?

vasike’s picture

here is a commit that upgrades Commerce AutoSKU version to the dev one
https://code.drupalcommerce.org/#/c/445/
The dev version also includes that patch #1616370-4: Feature with AutoSKU do not get reverted, used in Kickstart.

The Question remains: Is it ok to delete the SKU Pattern when the AutoSKU is disabled or should be kept?

bojanz’s picture

Status: Needs review » Fixed

I think deleting is fine.
Merged the commit.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.