yii\base\InvalidConfigException: Invalid product ID: when saving a product (via CP or other ways)
In the database I see content-rows for each site (enabled+disabled) for the variants, while there are only content-rows for products for each enabled site.
Steps to reproduce
Create a product with multiple sites enabled
Disable a few site
... something in the past introduced variants for each site, but not products
Save product
Expected behavior
Save only variants for enabled sites, or create a row in content-table for each product despite disabled site
Actual behavior
Tries to save a variant for the disabled site and can't find a product for that site.
What happened?
Description
yii\base\InvalidConfigException: Invalid product ID: when saving a product (via CP or other ways)
In the database I see content-rows for each site (enabled+disabled) for the variants, while there are only content-rows for products for each enabled site.
Steps to reproduce
Expected behavior
Save only variants for enabled sites, or create a row in content-table for each product despite disabled site
Actual behavior
Tries to save a variant for the disabled site and can't find a product for that site.
Stack trace
Craft CMS version
3.7.63.1
Craft Commerce version
3.4.19
PHP version
7.4
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
-