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?
-
Is your import trying to add new options to a product attribute? The error is saying there are options but not values for those new options.André Ferraz– André Ferraz2017年01月27日 11:19:15 +00:00Commented Jan 27, 2017 at 11:19
-
No, it's inserting a new Configurable with several Simple products attached.James– James2017年01月30日 09:04:13 +00:00Commented Jan 30, 2017 at 9:04
-
I'm also having this issue on 2.1.2, if I am setting the values at a store level on a new product, the options dont appear in global, even though the attribute itself is global, not sure why its happening though.DWils– DWils2017年03月29日 00:22:57 +00:00Commented Mar 29, 2017 at 0:22
-
hi, did you solve this?simonthesorcerer– simonthesorcerer2017年11月28日 14:38:29 +00:00Commented Nov 28, 2017 at 14:38
1 Answer 1
Your configurable attribute isn't in product attribute set. Dont' forget to refresh yor cache after you add it to set.
Explore related questions
See similar questions with these tags.