4

enter image description here

When i'm trying to view my all migrated customers then getting following error.

1 exception(s):
 Exception #0 (BadMethodCallException): Missing required argument $options    of Magento\Eav\Model\Entity\Attribute\Source\Config.

Exception #0 (BadMethodCallException): Missing required argument $options of Magento\Eav\Model\Entity\Attribute\Source\Config.
#0 /var/www/html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(82): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('Magento\\Eav\\Mod...', Array, Array)
#1 /var/www/html/vendor/magento/framework/ObjectManager/ObjectManager.php(57): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Eav\\Mod...', Array)
#2 /var/www/html/vendor/magento/framework/Validator/UniversalFactory.php(36): Magento\Framework\ObjectManager\ObjectManager->create('Magento\\Eav\\Mod...', Array)
#3 /var/www/html/vendor/magento/module-eav/Model/Entity/Attribute/AbstractAttribute.php(537): Magento\Framework\Validator\UniversalFactory->create('Magento\\Eav\\Mod...')
#4 /var/www/html/vendor/magento/module-customer/Model/AttributeMetadataConverter.php(66): Magento\Eav\Model\Entity\Attribute\AbstractAttribute->getSource()
#5 /var/www/html/vendor/magento/module-customer/Model/Metadata/CustomerMetadata.php(77): Magento\Customer\Model\AttributeMetadataConverter->createMetadataAttribute(Object(Magento\Customer\Model\Attribute))
#6 /var/www/html/vendor/magento/module-customer/Model/Metadata/CustomerMetadata.php(109): Magento\Customer\Model\Metadata\CustomerMetadata->getAttributeMetadata('assigned_sales_...')
#7 /var/www/html/vendor/magento/module-customer/Model/Metadata/CachedMetadata.php(82): Magento\Customer\Model\Metadata\CustomerMetadata->getAllAttributesMetadata()
#8 /var/www/html/vendor/magento/module-customer/Ui/Component/Listing/AttributeRepository.php(66): Magento\Customer\Model\Metadata\CachedMetadata->getAllAttributesMetadata()
#9 /var/www/html/vendor/magento/module-customer/Ui/Component/Listing/Columns.php(96): Magento\Customer\Ui\Component\Listing\AttributeRepository->getList()
#10 /var/www/html/vendor/magento/framework/View/Layout/Generator/UiComponent.php(148): Magento\Customer\Ui\Component\Listing\Columns->prepare()
#11 /var/www/html/vendor/magento/framework/View/Layout/Generator/UiComponent.php(145): Magento\Framework\View\Layout\Generator\UiComponent->prepareComponent(Object(Magento\Customer\Ui\Component\Listing\Columns))
#12 /var/www/html/vendor/magento/framework/View/Layout/Generator/UiComponent.php(126): Magento\Framework\View\Layout\Generator\UiComponent->prepareComponent(Object(Magento\Ui\Component\Listing))
#13 /var/www/html/vendor/magento/framework/View/Layout/Generator/UiComponent.php(93): Magento\Framework\View\Layout\Generator\UiComponent->generateComponent(Object(Magento\Framework\View\Layout\Data\Structure), 'customer_listin...', Array, Object(Magento\Framework\View\Layout\Interceptor))
#14 /var/www/html/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))
#15 /var/www/html/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))
#16 /var/www/html/var/generation/Magento/Framework/View/Layout/Interceptor.php(89): Magento\Framework\View\Layout->generateElements()
#17 /var/www/html/vendor/magento/framework/View/Layout/Builder.php(129): Magento\Framework\View\Layout\Interceptor->generateElements()
#18 /var/www/html/vendor/magento/framework/View/Page/Builder.php(55): Magento\Framework\View\Layout\Builder->generateLayoutBlocks()
#19 /var/www/html/vendor/magento/framework/View/Layout/Builder.php(65): Magento\Framework\View\Page\Builder->generateLayoutBlocks()
#20 /var/www/html/vendor/magento/framework/View/Layout.php(244): Magento\Framework\View\Layout\Builder->build()
#21 /var/www/html/vendor/magento/framework/View/Layout.php(859): Magento\Framework\View\Layout->build()
#22 /var/www/html/var/generation/Magento/Framework/View/Layout/Interceptor.php(414): Magento\Framework\View\Layout->getBlock('menu')
#23 /var/www/html/vendor/magento/module-backend/Model/View/Result/Page.php(59): Magento\Framework\View\Layout\Interceptor->getBlock('menu')
#24 /var/www/html/var/generation/Magento/Backend/Model/View/Result/Page/Interceptor.php(24): Magento\Backend\Model\View\Result\Page->setActiveMenu('Magento_Custome...')
#25 /var/www/html/vendor/magento/module-customer/Controller/Adminhtml/Index/Index.php(26): Magento\Backend\Model\View\Result\Page\Interceptor->setActiveMenu('Magento_Custome...')
#26 /var/www/html/var/generation/Magento/Customer/Controller/Adminhtml/Index/Index/Interceptor.php(24): Magento\Customer\Controller\Adminhtml\Index\Index->execute()
#27 /var/www/html/vendor/magento/framework/App/Action/Action.php(102): Magento\Customer\Controller\Adminhtml\Index\Index\Interceptor->execute()
#28 /var/www/html/vendor/magento/module-backend/App/AbstractAction.php(226): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#29 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Backend\App\AbstractAction->dispatch(Object(Magento\Framework\App\Request\Http))
#30 /var/www/html/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Customer\Controller\Adminhtml\Index\Index\Interceptor->___callParent('dispatch', Array)
#31 /var/www/html/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Custome...', 'dispatch', Object(Magento\Customer\Controller\Adminhtml\Index\Index\Interceptor), Array, 'adminAuthentica...')
#32 /var/www/html/vendor/magento/module-backend/App/Action/Plugin/Authentication.php(143): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#33 /var/www/html/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch(Object(Magento\Customer\Controller\Adminhtml\Index\Index\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#34 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Custome...', 'dispatch', Object(Magento\Customer\Controller\Adminhtml\Index\Index\Interceptor), Array, 'adminMassaction...')
#35 /var/www/html/vendor/magento/module-backend/App/Action/Plugin/MassactionKey.php(33): Magento\Customer\Controller\Adminhtml\Index\Index\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#36 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(142): Magento\Backend\App\Action\Plugin\MassactionKey->aroundDispatch(Object(Magento\Customer\Controller\Adminhtml\Index\Index\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#37 /var/www/html/var/generation/Magento/Customer/Controller/Adminhtml/Index/Index/Interceptor.php(39): Magento\Customer\Controller\Adminhtml\Index\Index\Interceptor->___callPlugins('dispatch', Array, Array)
#38 /var/www/html/vendor/magento/framework/App/FrontController.php(55): Magento\Customer\Controller\Adminhtml\Index\Index\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#39 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#40 /var/www/html/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#41 /var/www/html/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'install')
#42 /var/www/html/vendor/magento/framework/Module/Plugin/DbStatusValidator.php(69): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#43 /var/www/html/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Framework\Module\Plugin\DbStatusValidator->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#44 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'infortis_cgen_m...')
#45 /var/www/html/app/code/Infortis/Cgen/Plugin/Magento/Framework/App/FrontController.php(32): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#46 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(142): Infortis\Cgen\Plugin\Magento\Framework\App\FrontController->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#47 /var/www/html/var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#48 /var/www/html/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#49 /var/www/html/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#50 /var/www/html/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#51 {main}

Update After compile and removed generation folder:

Fatal error: Uncaught TypeError: Argument 1 passed to Magento\Eav\Model\Entity\Attribute\Source\Config::__construct() must be of the type array, null given, called in /var/www/html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 93 and defined in /var/www/html/vendor/magento/module-eav/Model/Entity/Attribute/Source/Config.php:26 
Stack trace: #0 /var/www/html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(93): Magento\Eav\Model\Entity\Attribute\Source\Config->__construct(NULL) 
#1 /var/www/html/vendor/magento/framework/ObjectManager/Factory/Compiled.php(88): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\\Eav\\Mod...', Array) 
#2 /var/www/html/vendor/magento/framework/ObjectManager/ObjectManager.php(57): Magento\Framework\ObjectManager\Factory\Compiled->create('Magento\\Eav\\Mod...', Array) 
#3 /var/www/html/vendor/magento/framework/Validator/UniversalFactory.php(36): Magento\Framework\ObjectManager\ObjectManager->create('Magento\\Eav\\Mod...', Arr in /var/www/html/vendor/magento/module-eav/Model/Entity/Attribute/Source/Config.php on line 26
  • Clear var/generation folder & run php bin/magento setup:di:compile – Ankit Shah Mar 8 '17 at 1:39
  • @Ankit I have done things as told by u. Error is not showing but when I'm trying to see customers it shows blank page. What should I do next? – Nitesh Mar 8 '17 at 8:05
  • Run command in order php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento setup:static-content:deploy php bin/magento indexer:reindex php bin/magento cache:flush & check for var\log for error logs exception.log – Ankit Shah Mar 8 '17 at 8:10
  • @Ankit After enable of error reporting it shows error. I have updated question with that error. – Nitesh Mar 8 '17 at 8:23
  • Go to magento\vendor & delete all files & folders then run composer install on root – Ankit Shah Mar 8 '17 at 8:27
4

Go to file var/www/html/vendor/magento/module-customer/Model/Config.php

Change to line 26 it will give detail description about error public function __construct(array $options) to public function __construct($options)

Detail error description

    Exception #0 (Magento\Framework\Exception\LocalizedException): No options found.
    #0 /var/www/html/vendor/magento/module-customer/Model/AttributeMetadataConverter.php(66): Magento\Eav\Model\Entity\Attribute\Source\Config->getAllOptions()
    #1 /var/www/html/vendor/magento/module-customer/Model/Metadata/CustomerMetadata.php(77): Magento\Customer\Model\AttributeMetadataConverter->createMetadataAttribute(Object(Magento\Customer\Model\Attribute))
    #2 /var/www/html/vendor/magento/module-customer/Model/Metadata/CustomerMetadata.php(109): Magento\Customer\Model\Metadata\CustomerMetadata->getAttributeMetadata('assigned_sales_...')
    .
    .
    etc

Then from that description take

#0 /var/www/html/vendor/magento/module-customer/Model/AttributeMetadataConverter.php(66):

Go to above file enter following code before line 66

echo '<pre>';
print_r($attribute->getData());

Then I get list of attribute_ids and see after which attribute_id error is comming take that one.

So I get attribute_id 150 who doesn't getting options.

So I'm not using that attribute_id so i have remove it..

Now my problem is solved and I can see my all migrated customers.

Please revert back all changes made in core files.

  • I tried the way which you said I too get that Id. In which table you have removed that attribute_id? which in your case is 150 – Bilal Usean Jul 31 '17 at 17:56
  • I got the table its cuatomer_eav_attribute – Bilal Usean Jul 31 '17 at 18:45
  • Helli @Nitesh, file is not exist in this path var/www/html/vendor/magento/module-customer/Model/Config.php ,Using Magento 2.2.4 version.Please share some code so that I can check it.I have same problem. – akgola Jul 18 '18 at 8:13
  • @akgola Yes, due to version change. – Nitesh Jul 18 '18 at 11:39
  • @akgola have you found file location i got same issue – Pawankumar Jan 21 at 10:37
1

I used this solution to solve the problem

  • open phpmyadmin
  • open 'customer_eav_attribute' table
  • find out what attributes are imported looking at rows id

enter image description here

as you can see from id 40 there is a large gap before next id

  • export a table backup ( so you can rollback if needed )
  • delete attributes that are imported but not well applied

in my specific case deleting rows with id 146,285,286,+ has solved the problem

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.