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?

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

1 Answer 1

0

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

answered Mar 29, 2018 at 10:21

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.