I have a product import routine which calls $this->productRepository->save($product);
but it's failing with the following error:
[Magento\Framework\Exception\InputException]
Option values are not specified.
Exception trace:
() at /vendor/magento/module-configurable-product/Model/OptionRepository.php:271
...
I have checked the eav_attribute_option_value
table and the attribute options all have values. What am I missing?
--UPDATE--
So after further digging, and comparing SQL dumps before/after saving through the admin area, it appears Magento replaces (deletes then inserts) the configurable option settings in the following tables:
catalog_product_super_attribute
catalog_product_super_attribute_label
catalog_product_super_link
Every time a configurable product is saved... Can anyone explain why this happens?