0

I try to create a new customer account with Magento 2.1.15 (via creating an order). After filling all required fields the following error occurred:

Error while saving the following order: Warning: Invalid argument supplied for foreach() in /html/magento2/vendor/magento/module-customer/Model/AttributeMetadataConverter.php on line 88

enter image description here

Also when I try to show the customer grid, the following error occurs:

1 exception(s):
Exception #0 (Exception): Warning: Invalid argument supplied for foreach() in /html/magento2/vendor/magento/module-customer/Model/AttributeMetadataConverter.php on line 88

Exception #0 (Exception): Warning: Invalid argument supplied for foreach() in /html/magento2/vendor/magento/module-customer/Model/AttributeMetadataConverter.php on line 88
#0 /html/magento2/vendor/magento/module-customer/Model/AttributeMetadataConverter.php(88): Magento\Framework\App\ErrorHandler->handler(2, 'Invalid argumen...', '/html/magento2/...', 88, Array)
#1 /html/magento2/vendor/magento/module-customer/Model/Metadata/CustomerMetadata.php(77): Magento\Customer\Model\AttributeMetadataConverter->createMetadataAttribute(Object(Magento\Eav\Model\Entity\Attribute))
#2 /html/magento2/vendor/magento/module-customer/Model/Metadata/CustomerMetadata.php(109): Magento\Customer\Model\Metadata\CustomerMetadata->getAttributeMetadata('disable_auto_gr...')
#3 /html/magento2/vendor/magento/module-customer/Model/Metadata/CachedMetadata.php(82): Magento\Customer\Model\Metadata\CustomerMetadata->getAllAttributesMetadata()
#4 /html/magento2/vendor/magento/module-customer/Ui/Component/Listing/AttributeRepository.php(66): Magento\Customer\Model\Metadata\CachedMetadata->getAllAttributesMetadata()
#5 /html/magento2/vendor/magento/module-customer/Ui/Component/Listing/Columns.php(96): Magento\Customer\Ui\Component\Listing\AttributeRepository->getList()
#6 /html/magento2/vendor/magento/framework/View/Layout/Generator/UiComponent.php(148): Magento\Customer\Ui\Component\Listing\Columns->prepare()
#7 /html/magento2/vendor/magento/framework/View/Layout/Generator/UiComponent.php(145): Magento\Framework\View\Layout\Generator\UiComponent->prepareComponent(Object(Magento\Customer\Ui\Component\Listing\Columns))
#8 /html/magento2/vendor/magento/framework/View/Layout/Generator/UiComponent.php(126): Magento\Framework\View\Layout\Generator\UiComponent->prepareComponent(Object(Magento\Ui\Component\Listing))
#9 /html/magento2/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))
#10 /html/magento2/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))
#11 /html/magento2/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))
#12 /html/magento2/vendor/magento/framework/View/Layout/Builder.php(129): Magento\Framework\View\Layout->generateElements()
#13 /html/magento2/vendor/magento/framework/View/Page/Builder.php(55): Magento\Framework\View\Layout\Builder->generateLayoutBlocks()
#14 /html/magento2/vendor/magento/framework/View/Layout/Builder.php(65): Magento\Framework\View\Page\Builder->generateLayoutBlocks()
#15 /html/magento2/vendor/magento/framework/View/Layout.php(244): Magento\Framework\View\Layout\Builder->build()
#16 /html/magento2/vendor/magento/framework/View/Layout.php(860): Magento\Framework\View\Layout->build()
#17 /html/magento2/vendor/magento/module-backend/Model/View/Result/Page.php(59): Magento\Framework\View\Layout->getBlock('menu')
#18 /html/magento2/vendor/magento/module-customer/Controller/Adminhtml/Index/Index.php(26): Magento\Backend\Model\View\Result\Page->setActiveMenu('Magento_Custome...')
#19 /html/magento2/vendor/magento/framework/App/Action/Action.php(102): Magento\Customer\Controller\Adminhtml\Index\Index->execute()
#20 /html/magento2/vendor/magento/module-backend/App/AbstractAction.php(232): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#21 /html/magento2/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Backend\App\AbstractAction->dispatch(Object(Magento\Framework\App\Request\Http))
#22 /html/magento2/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Customer\Controller\Adminhtml\Index\Index\Interceptor->___callParent('dispatch', Array)
#23 /html/magento2/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, 'weltpixel-owlca...')
#24 /html/magento2/app/code/WeltPixel/Backend/Plugin/Utility.php(76): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#25 /html/magento2/vendor/magento/framework/Interception/Chain/Chain.php(67): WeltPixel\Backend\Plugin\Utility->aroundDispatch(Object(Magento\Customer\Controller\Adminhtml\Index\Index\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#26 /html/magento2/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...')
#27 /html/magento2/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))
#28 /html/magento2/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))
#29 /html/magento2/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...')
#30 /html/magento2/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))
#31 /html/magento2/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))
#32 /html/magento2/var/generation/Magento/Customer/Controller/Adminhtml/Index/Index/Interceptor.php(26): Magento\Customer\Controller\Adminhtml\Index\Index\Interceptor->___callPlugins('dispatch', Array, Array)
#33 /html/magento2/vendor/magento/framework/App/FrontController.php(55): Magento\Customer\Controller\Adminhtml\Index\Index\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#34 /html/magento2/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#35 /html/magento2/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#36 /html/magento2/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'install')
#37 /html/magento2/vendor/magento/framework/Module/Plugin/DbStatusValidator.php(69): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#38 /html/magento2/vendor/magento/framework/Interception/Interceptor.php(142): Magento\Framework\Module\Plugin\DbStatusValidator->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#39 /html/magento2/var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#40 /html/magento2/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#41 /html/magento2/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#42 /html/magento2/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#43 {main}

There is obviously a problem with required fields. Does anybody know where should I start to find these (hidden) required fields? Many thanks in advance.

1 Answer 1

0

I found this post: "Missing required argument $options" After migration from magento 1.9.2.4 to 2.1.3

and figured out the error with this code:

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

in this file: AttributeMetadataConverter.php With this I sorted out the ids with problems and modified them. It works.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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