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

New products failing to validate #1359

Closed
hannahwoodward opened this issue Apr 6, 2020 · 2 comments
Closed

New products failing to validate #1359

hannahwoodward opened this issue Apr 6, 2020 · 2 comments

Comments

@hannahwoodward
Copy link

Description

Currently working on a site (with Craft multi-site enabled) where I've just switched off the 'multiple variants' setting for a product type, and now no new products can be created as they're failing to validate. The Craft flash notice says 'Couldn't save product.', then looking in the logs I find this:

2020-04-06 13:56:58 [-][1][6m88d4sbpo7e5a9l2pjukdkdmd][info][craft\services\Elements::_saveElementInternal] Element not saved due to validation error: Array
(
    [variants] => Array
        (
            [0] => Error saving variants
        )

)

Other notes:

  • New products do save if I mark them as disabled, but I can't ever enable them
  • Existing products can still be updated & are successfully saved without any issues
  • I tried creating a new product type with exactly the same fields and without multiple variants. Creating a new product under this product type successfully saved.

Steps to reproduce

  1. Create a product type with multiple variants enabled
  2. Disable multiple variants
  3. Try to create a new product

Additional info

  • Craft version: 3.4.13
  • PHP version: 7.4
  • Database driver & version: MySQL 5.7.29
  • Plugins & versions: Algolia (2.0.0), Amazon S3 (1.2.7), Asset Rev (6.0.2), Control Panel CSS (2.2.1), Craft Commerce (3.1.1), Events (1.4.4), Freeform (3.6.5), Icon Picker (1.1.2), Redactor (2.6.1), SEOmatic (3.2.50), Site Switcher (2.1.0), Stripe for Commerce (2.2.3), Super Table (2.4.7), Scout (2.2.2), Sentry SDK (1.0.6)
@lukeholder
Copy link
Member

Could you send your database dump/backup to support@craftcms.com and reference this issue. We can then take a better look.

Also include the name of the product type etc.

@lukeholder
Copy link
Member

Thanks @hannahwoodward I think we figured this out and have fixed it for the next release.

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

No branches or pull requests

2 participants