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
I wanted to roll back to an older revision of a product, but suddenly all variants were removed. A look at the logs revealed the reason:
caught exception ‘yii\db\Exception’ with message ’SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column ‘sku’ at row 1
The SQL being executed was: UPDATE commerce_purchasables SET sku=‘__temp_cpdwvjihrjmpahvaqhwhhbbiffopyqdlljsj-__temp_oweumktnbvwppomffaukwnqnuwcextywsshx-__temp_ljqqafnpzbnqknjymlmirpbucfxitrwzhnwe-__temp_ygrszrxrooylsbqdwdhygsjoeqlcfpowveom-__temp_pygflgannthbmegmnladmxvavkyqgqjnmnpj-__temp_ahxizahtwavkunnbvdlfutihqgktsckpgchi-myvariant-150’, dateUpdated=‘2024-10-16 08:16:39’ WHERE id=194914' in
Steps to reproduce
Create a product with some variants (we have 6 variants)
Save multiple edits
Open an old revision
Variants field is empty, even if that revision had variants originally
Expected behavior
That it opens a revision with the variants that were saved for that revision
Actual behavior
It opens the revision, but without any variants
Craft CMS version
Craft Pro 5.4.8
Craft Commerce version
5.1.3
PHP version
No response
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
No response
The text was updated successfully, but these errors were encountered:
What happened?
Description
I wanted to roll back to an older revision of a product, but suddenly all variants were removed. A look at the logs revealed the reason:
caught exception ‘yii\db\Exception’ with message ’SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column ‘sku’ at row 1
The SQL being executed was: UPDATE
commerce_purchasables
SETsku
=‘__temp_cpdwvjihrjmpahvaqhwhhbbiffopyqdlljsj-__temp_oweumktnbvwppomffaukwnqnuwcextywsshx-__temp_ljqqafnpzbnqknjymlmirpbucfxitrwzhnwe-__temp_ygrszrxrooylsbqdwdhygsjoeqlcfpowveom-__temp_pygflgannthbmegmnladmxvavkyqgqjnmnpj-__temp_ahxizahtwavkunnbvdlfutihqgktsckpgchi-myvariant-150’,dateUpdated
=‘2024-10-16 08:16:39’ WHEREid
=194914' inSteps to reproduce
Expected behavior
That it opens a revision with the variants that were saved for that revision
Actual behavior
It opens the revision, but without any variants
Craft CMS version
Craft Pro 5.4.8
Craft Commerce version
5.1.3
PHP version
No response
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
No response
The text was updated successfully, but these errors were encountered: