Skip to content

Can't select custom attribute_set in configurable product creation #7579

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
developer-lindner opened this issue Nov 26, 2016 · 9 comments
Closed
Labels
bug report Component: Catalog Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed

Comments

@developer-lindner
Copy link

Preconditions

  1. Magento2 Version 2.1.2
  2. PHP 7.0.12-1
  3. MySQL Percona 5.6.30

Steps to reproduce

  1. Go to Products->Catalog in the Backend.
  2. click 'Add product'
  3. Try to select a custom Attribute-Set

Expected result

  1. Selected Attribute-Set will be set properly

Actual result

  1. 500 (Internal Server Error) in Ajax Response after selecting a custom attribute set with the following response:

1 exception(s):
Exception #0 (Magento\Framework\Exception\InputException): attribute_set_id is a required field.

Exception #0 (Magento\Framework\Exception\InputException): attribute_set_id is a required field.
#0 vendor/magento/module-eav/Model/Attribute/GroupRepository.php(111): Magento\Framework\Exception\InputException::requiredField('attribute_set_i...')
#1 vendor/magento/module-catalog/Model/ProductAttributeGroupRepository.php(57): Magento\Eav\Model\Attribute\GroupRepository->getList(Object(Magento\Framework\Api\SearchCriteria))
#2 vendor/magento/module-catalog/Ui/DataProvider/Product/Form/Modifier/Eav.php(426): Magento\Catalog\Model\ProductAttributeGroupRepository->getList(Object(Magento\Framework\Api\SearchCriteria))
#3 vendor/magento/module-catalog/Ui/DataProvider/Product/Form/Modifier/Eav.php(241): Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\Eav->getGroups()
#4 vendor/magento/module-catalog/Ui/DataProvider/Product/Form/ProductDataProvider.php(68): Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\Eav->modifyMeta(Array)
#5 vendor/magento/framework/View/Element/UiComponentFactory.php(269): Magento\Catalog\Ui\DataProvider\Product\Form\ProductDataProvider->getMeta()
#6 vendor/magento/framework/View/Element/UiComponentFactory.php(164): Magento\Framework\View\Element\UiComponentFactory->mergeMetadata('product_form', Array, false)
#7 vendor/magento/framework/View/Layout/Generator/UiComponent.php(124): Magento\Framework\View\Element\UiComponentFactory->create('product_form', NULL, Array)
#8 vendor/magento/framework/View/Layout/Generator/UiComponent.php(93): Magento\Framework\View\Layout\Generator\UiComponent->generateComponent(Object(Magento\Framework\View\Layout\Data\Structure), 'product_form', Array, Object(Magento\Framework\View\Layout\Interceptor))
#9 vendor/magento/framework/View/Layout/GeneratorPool.php(86): Magento\Framework\View\Layout\Generator\UiComponent->process(Object(Magento\Framework\View\Layout\Reader\Context), Object(Magento\Framework\View\Layout\Generator\Context))
#10 vendor/magento/framework/View/Layout.php(327): Magento\Framework\View\Layout\GeneratorPool->process(Object(Magento\Framework\View\Layout\Reader\Context), Object(Magento\Framework\View\Layout\Generator\Context))
#11 var/generation/Magento/Framework/View/Layout/Interceptor.php(89): Magento\Framework\View\Layout->generateElements()
#12 vendor/magento/framework/View/Layout/Builder.php(129): Magento\Framework\View\Layout\Interceptor->generateElements()
#13 vendor/magento/framework/View/Layout/Builder.php(65): Magento\Framework\View\Layout\Builder->generateLayoutBlocks()
#14 vendor/magento/framework/View/Layout.php(244): Magento\Framework\View\Layout\Builder->build()
#15 vendor/magento/framework/View/Layout.php(935): Magento\Framework\View\Layout->build()
#16 var/generation/Magento/Framework/View/Layout/Interceptor.php(492): Magento\Framework\View\Layout->getOutput()
#17 vendor/magento/framework/View/Result/Layout.php(181): Magento\Framework\View\Layout\Interceptor->getOutput()
#18 vendor/magento/framework/View/Result/Layout.php(164): Magento\Framework\View\Result\Layout->render(Object(Magento\Framework\App\Response\Http\Interceptor))
#19 var/generation/Magento/Framework/View/Result/Layout/Interceptor.php(89): Magento\Framework\View\Result\Layout->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#20 vendor/magento/framework/App/Http.php(139): Magento\Framework\View\Result\Layout\Interceptor->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#21 vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#22 index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#23 {main}

@orderofwigs
Copy link

hey, i have the same problem. i think it is related to migrated attribute set from an older magento version. please let us know if you found out any fixes or specific causes?
thanks

@developer-lindner
Copy link
Author

@veloraven Hey, any update here? Internal ticket or something?!

@olysenko
Copy link

Hi, this issue is a duplicate of 5999. In this comment you can see workaround. Closed as a duplicate. Feel free to reopen this if you think you have another issue

@developer-lindner
Copy link
Author

@olysenko Thanks, i've noticed that my issue arised through migrated attribute sets.

@dunarri
Copy link

dunarri commented Dec 19, 2016

I have the same problem, what was the fix?

@olysenko
Copy link

@dunarri, try this workaround comment.

@dunarri
Copy link

dunarri commented Dec 19, 2016

I saw that, but price was in Product Details and I added Bundle Items.
I believe this is a separate issue as the exception message and stack trace is different. To prove this I created a new attribute set in Magento 2 that was identical to the migrated attribute set. The new one works fine, the migrated one has the error in OP.
Should I create a new issue?

@developer-lindner
Copy link
Author

developer-lindner commented Dec 20, 2016

@dunarri no, because the issue is introduced by migrated data which doesn't fits the magento2 attribute set structure. the code is fine, just the migrated data (attribute sets) is fucked up. you'll have to create all needed attribute sets in magento2 and allocate all needed attributes to the set manually.

@ghost
Copy link

ghost commented Nov 15, 2017

This will happen when you have attributes that are migrated but some belong to an old extension.
Mine was the Pre-order extension. After removing both Attributes from the old Pre-order extension the pages were loading fine.

Just enable error reporting in app/bootstrap.php error_reporting(E_ALL);
ini_set("display_errors", 1);

And look for old extension information in the error.
After that remove all the attributes according to that extension.

It works like a charm for me.
I hope it will help someone.

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Nov 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Component: Catalog Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed
Projects
None yet
Development

No branches or pull requests

6 participants