Skip to content
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

Error duplicating products if system has multi-site #1491

Closed
watarutmnh opened this issue Jun 8, 2020 · 3 comments
Closed

Error duplicating products if system has multi-site #1491

watarutmnh opened this issue Jun 8, 2020 · 3 comments
Labels

Comments

@watarutmnh
Copy link
Contributor

watarutmnh commented Jun 8, 2020

Description
An error occurs when duplicating a product if the system has multiple sites running.
Here is the error detail:

HTTP 500 – Internal Server Error – yii\web\ServerErrorHttpException
An error occurred when duplicating the product.
↵
Caused by: Integrity constraint violation – yii\db\IntegrityException
SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'dateCreated' cannot be null
The SQL being executed was: UPDATE `commerce_products` SET `defaultPrice`='0', `defaultHeight`='0', `defaultLength`='0', `defaultWidth`='0', `defaultWeight`='0', `dateCreated`=NULL, `dateUpdated`='2020-06-08 08:17:17' WHERE `id`=29
in /project-folder/vendor/yiisoft/yii2/db/Schema.php at line 674

Error Info: Array
(
    [0] => 23000
    [1] => 1048
    [2] => Column 'dateCreated' cannot be null
)
↵
Caused by: PDOException
SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'dateCreated' cannot be null
in /project-folder/vendor/yiisoft/yii2/db/Command.php at line 1293

To Reproduce

  1. Install commerce plugin
  2. Add an additional site
  3. Try to duplicate initially created product "A New Toga"
  4. An error occurs

Additional info

  • Craft version: 3.4.22.1
  • PHP version: 7.3.14
  • Database driver & version: MySQL 5.7.29
  • Craft Commerce 3.1.7
@watarutmnh watarutmnh added the New label Jun 8, 2020
@watarutmnh watarutmnh changed the title Error duplicating products if system has multi site Error duplicating products if system has multi-site Jun 8, 2020
@engram-design
Copy link
Contributor

+1 for this issue as well.

@lukeholder
Copy link
Member

Working on it as we speak.

@lukeholder lukeholder added bug and removed New labels Jun 11, 2020
@brandonkelly
Copy link
Member

We just released Commerce 3.1.8 with this fix.

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

No branches or pull requests

4 participants