4

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 Jan 27 '17 at 11:19
  • No, it's inserting a new Configurable with several Simple products attached. – James Jan 30 '17 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 Mar 29 '17 at 0:22
  • hi, did you solve this? – simonthesorcerer Nov 28 '17 at 14:38
0

Your configurable attribute isn't in product attribute set. Dont' forget to refresh yor cache after you add it to set.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.