cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2.4 TypeError: reset error when accessing Payment Mehtods Configuration

SOLVED

Magento 2.4 TypeError: reset error when accessing Payment Mehtods Configuration

Hi,

 

I recently upgraded to Magento 2.4.7, I was working without any issues, but suddenly I started having an error when from backend I access STORES > CONFIGURATION > SALES > PAYMENT METHODS

 

I can't figure out what is causing this error. Does anyone have encountered the same error or know what I can check?

 

thank you.

 

The error is:

TypeError: reset(): Argument #1 ($array) must be of type array, null given in /var/www/magento/vendor/magento/module-config/Model/Config/Structure/Element/Iterator.php:137
Stack trace:
#0 /var/www/magento/vendor/magento/module-config/Model/Config/Structure/Element/Iterator.php(137): reset()
#1 /var/www/magento/generated/code/Magento/Config/Model/Config/Structure/Element/Iterator/Field/Interceptor.php(68): Magento\Config\Model\Config\Structure\Element\Iterator->rewind()
#2 /var/www/magento/vendor/magento/module-config/Model/Config/Structure/Element/AbstractComposite.php(64): Magento\Config\Model\Config\Structure\Element\Iterator\Field\Interceptor->rewind()
#3 /var/www/magento/vendor/magento/module-config/Model/Config/Structure/Element/AbstractComposite.php(88): Magento\Config\Model\Config\Structure\Element\AbstractComposite->hasChildren()
#4 /var/www/magento/vendor/magento/module-config/Model/Config/Structure/Element/Group/Proxy.php(131): Magento\Config\Model\Config\Structure\Element\AbstractComposite->isVisible()
#5 /var/www/magento/vendor/magento/module-config/Model/Config/Structure/Element/Iterator.php(140): Magento\Config\Model\Config\Structure\Element\Group\Proxy->isVisible()
#6 /var/www/magento/generated/code/Magento/Config/Model/Config/Structure/Element/Iterator/Field/Interceptor.php(68): Magento\Config\Model\Config\Structure\Element\Iterator->rewind()
#7 /var/www/magento/vendor/magento/module-config/Model/Config/Structure/Element/AbstractComposite.php(64): Magento\Config\Model\Config\Structure\Element\Iterator\Field\Interceptor->rewind()
#8 /var/www/magento/vendor/magento/module-config/Model/Config/Structure/Element/AbstractComposite.php(88): Magento\Config\Model\Config\Structure\Element\AbstractComposite->hasChildren()
#9 /var/www/magento/vendor/magento/module-config/Model/Config/Structure/Element/Iterator.php(89): Magento\Config\Model\Config\Structure\Element\AbstractComposite->isVisible()
#10 /var/www/magento/generated/code/Magento/Config/Model/Config/Structure/Element/Iterator/Group/Interceptor.php(41): Magento\Config\Model\Config\Structure\Element\Iterator->next()
#11 /var/www/magento/vendor/magento/module-config/Block/System/Config/Form.php(201): Magento\Config\Model\Config\Structure\Element\Iterator\Group\Interceptor->next()
#12 /var/www/magento/generated/code/Magento/Config/Block/System/Config/Form/Interceptor.php(23): Magento\Config\Block\System\Config\Form->initForm()
#13 /var/www/magento/vendor/magento/module-config/Block/System/Config/Form.php(542): Magento\Config\Block\System\Config\Form\Interceptor->initForm()
#14 /var/www/magento/vendor/magento/framework/View/Element/AbstractBlock.php(1127): Magento\Config\Block\System\Config\Form->_beforeToHtml()
#15 /var/www/magento/vendor/magento/framework/View/Element/AbstractBlock.php(1132): Magento\Framework\View\Element\AbstractBlock->Magento\Framework\View\Element\{closure}()
#16 /var/www/magento/vendor/magento/framework/View/Element/AbstractBlock.php(676): Magento\Framework\View\Element\AbstractBlock->_loadCache()
#17 /var/www/magento/generated/code/Magento/Config/Block/System/Config/Form/Interceptor.php(536): Magento\Framework\View\Element\AbstractBlock->toHtml()
#18 /var/www/magento/vendor/magento/framework/View/Layout.php(578): Magento\Config\Block\System\Config\Form\Interceptor->toHtml()
#19 /var/www/magento/vendor/magento/framework/View/Layout.php(555): Magento\Framework\View\Layout->_renderBlock()
#20 /var/www/magento/generated/code/Magento/Framework/View/Layout/Interceptor.php(149): Magento\Framework\View\Layout->renderNonCachedElement()
#21 /var/www/magento/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement()
#22 /var/www/magento/generated/code/Magento/Framework/View/Layout/Interceptor.php(140): Magento\Framework\View\Layout->renderElement()
#23 /var/www/magento/vendor/magento/framework/View/Element/AbstractBlock.php(523): Magento\Framework\View\Layout\Interceptor->renderElement()
#24 /var/www/magento/generated/code/Magento/Config/Block/System/Config/Edit/Interceptor.php(347): Magento\Framework\View\Element\AbstractBlock->getChildHtml()
#25 /var/www/magento/vendor/magento/module-config/view/adminhtml/templates/system/config/edit.phtml(32): Magento\Config\Block\System\Config\Edit\Interceptor->getChildHtml()
#26 /var/www/magento/vendor/magento/framework/View/TemplateEngine/Php.php(67): include('...')
#27 /var/www/magento/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\View\TemplateEngine\Php->render()
#28 /var/www/magento/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\View\TemplateEngine\Php\Interceptor->___callParent()
#29 /var/www/magento/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\View\TemplateEngine\Php\Interceptor->Magento\Framework\Interception\{closure}()
#30 /var/www/magento/generated/code/Magento/Framework/View/TemplateEngine/Php/Interceptor.php(23): Magento\Framework\View\TemplateEngine\Php\Interceptor->___callPlugins()
#31 /var/www/magento/vendor/magento/framework/View/Element/Template.php(263): Magento\Framework\View\TemplateEngine\Php\Interceptor->render()
#32 /var/www/magento/generated/code/Magento/Config/Block/System/Config/Edit/Interceptor.php(185): Magento\Framework\View\Element\Template->fetchView()
#33 /var/www/magento/vendor/magento/framework/View/Element/Template.php(293): Magento\Config\Block\System\Config\Edit\Interceptor->fetchView()
#34 /var/www/magento/vendor/magento/module-backend/Block/Template.php(141): Magento\Framework\View\Element\Template->_toHtml()
#35 /var/www/magento/vendor/magento/framework/View/Element/AbstractBlock.php(1128): Magento\Backend\Block\Template->_toHtml()
#36 /var/www/magento/vendor/magento/framework/View/Element/AbstractBlock.php(1132): Magento\Framework\View\Element\AbstractBlock->Magento\Framework\View\Element\{closure}()
#37 /var/www/magento/vendor/magento/framework/View/Element/AbstractBlock.php(676): Magento\Framework\View\Element\AbstractBlock->_loadCache()
#38 /var/www/magento/generated/code/Magento/Config/Block/System/Config/Edit/Interceptor.php(410): Magento\Framework\View\Element\AbstractBlock->toHtml()
#39 /var/www/magento/vendor/magento/framework/View/Layout.php(578): Magento\Config\Block\System\Config\Edit\Interceptor->toHtml()
#40 /var/www/magento/vendor/magento/framework/View/Layout.php(555): Magento\Framework\View\Layout->_renderBlock()
#41 /var/www/magento/generated/code/Magento/Framework/View/Layout/Interceptor.php(149): Magento\Framework\View\Layout->renderNonCachedElement()
#42 /var/www/magento/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement()
#43 /var/www/magento/generated/code/Magento/Framework/View/Layout/Interceptor.php(140): Magento\Framework\View\Layout->renderElement()
#44 /var/www/magento/vendor/magento/framework/View/Layout.php(606): Magento\Framework\View\Layout\Interceptor->renderElement()
#45 /var/www/magento/vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Layout->_renderContainer()
#46 /var/www/magento/generated/code/Magento/Framework/View/Layout/Interceptor.php(149): Magento\Framework\View\Layout->renderNonCachedElement()
#47 /var/www/magento/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement()
#48 /var/www/magento/generated/code/Magento/Framework/View/Layout/Interceptor.php(140): Magento\Framework\View\Layout->renderElement()
#49 /var/www/magento/vendor/magento/framework/View/Layout.php(606): Magento\Framework\View\Layout\Interceptor->renderElement()
#50 /var/www/magento/vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Layout->_renderContainer()
#51 /var/www/magento/generated/code/Magento/Framework/View/Layout/Interceptor.php(149): Magento\Framework\View\Layout->renderNonCachedElement()
#52 /var/www/magento/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement()
#53 /var/www/magento/generated/code/Magento/Framework/View/Layout/Interceptor.php(140): Magento\Framework\View\Layout->renderElement()
#54 /var/www/magento/vendor/magento/framework/View/Layout.php(606): Magento\Framework\View\Layout\Interceptor->renderElement()
#55 /var/www/magento/vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Layout->_renderContainer()
#56 /var/www/magento/generated/code/Magento/Framework/View/Layout/Interceptor.php(149): Magento\Framework\View\Layout->renderNonCachedElement()
#57 /var/www/magento/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement()
#58 /var/www/magento/generated/code/Magento/Framework/View/Layout/Interceptor.php(140): Magento\Framework\View\Layout->renderElement()
#59 /var/www/magento/vendor/magento/framework/View/Layout.php(606): Magento\Framework\View\Layout\Interceptor->renderElement()
#60 /var/www/magento/vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Layout->_renderContainer()
#61 /var/www/magento/generated/code/Magento/Framework/View/Layout/Interceptor.php(149): Magento\Framework\View\Layout->renderNonCachedElement()
#62 /var/www/magento/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement()
#63 /var/www/magento/generated/code/Magento/Framework/View/Layout/Interceptor.php(140): Magento\Framework\View\Layout->renderElement()
#64 /var/www/magento/vendor/magento/framework/View/Layout.php(606): Magento\Framework\View\Layout\Interceptor->renderElement()
#65 /var/www/magento/vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Layout->_renderContainer()
#66 /var/www/magento/generated/code/Magento/Framework/View/Layout/Interceptor.php(149): Magento\Framework\View\Layout->renderNonCachedElement()
#67 /var/www/magento/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement()
#68 /var/www/magento/generated/code/Magento/Framework/View/Layout/Interceptor.php(140): Magento\Framework\View\Layout->renderElement()
#69 /var/www/magento/vendor/magento/framework/View/Layout.php(606): Magento\Framework\View\Layout\Interceptor->renderElement()
#70 /var/www/magento/vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Layout->_renderContainer()
#71 /var/www/magento/generated/code/Magento/Framework/View/Layout/Interceptor.php(149): Magento\Framework\View\Layout->renderNonCachedElement()
#72 /var/www/magento/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement()
#73 /var/www/magento/generated/code/Magento/Framework/View/Layout/Interceptor.php(140): Magento\Framework\View\Layout->renderElement()
#74 /var/www/magento/vendor/magento/framework/View/Layout.php(606): Magento\Framework\View\Layout\Interceptor->renderElement()
#75 /var/www/magento/vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Layout->_renderContainer()
#76 /var/www/magento/generated/code/Magento/Framework/View/Layout/Interceptor.php(149): Magento\Framework\View\Layout->renderNonCachedElement()
#77 /var/www/magento/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement()
#78 /var/www/magento/generated/code/Magento/Framework/View/Layout/Interceptor.php(140): Magento\Framework\View\Layout->renderElement()
#79 /var/www/magento/vendor/magento/framework/View/Layout.php(606): Magento\Framework\View\Layout\Interceptor->renderElement()
#80 /var/www/magento/vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Layout->_renderContainer()
#81 /var/www/magento/generated/code/Magento/Framework/View/Layout/Interceptor.php(149): Magento\Framework\View\Layout->renderNonCachedElement()
#82 /var/www/magento/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement()
#83 /var/www/magento/generated/code/Magento/Framework/View/Layout/Interceptor.php(140): Magento\Framework\View\Layout->renderElement()
#84 /var/www/magento/vendor/magento/framework/View/Layout.php(975): Magento\Framework\View\Layout\Interceptor->renderElement()
#85 /var/www/magento/generated/code/Magento/Framework/View/Layout/Interceptor.php(347): Magento\Framework\View\Layout->getOutput()
#86 /var/www/magento/vendor/magento/framework/View/Result/Page.php(260): Magento\Framework\View\Layout\Interceptor->getOutput()
#87 /var/www/magento/vendor/magento/framework/View/Result/Layout.php(171): Magento\Framework\View\Result\Page->render()
#88 /var/www/magento/generated/code/Magento/Backend/Model/View/Result/Page/Interceptor.php(140): Magento\Framework\View\Result\Layout->renderResult()
#89 /var/www/magento/vendor/magento/framework/App/Http.php(120): Magento\Backend\Model\View\Result\Page\Interceptor->renderResult()
#90 /var/www/magento/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\Http->launch()
#91 /var/www/magento/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\Http\Interceptor->___callParent()
#92 /var/www/magento/vendor/magento/module-application-performance-monitor/Plugin/ApplicationPerformanceMonitor.php(38): Magento\Framework\App\Http\Interceptor->Magento\Framework\Interception\{closure}()
#93 /var/www/magento/vendor/magento/framework/Interception/Interceptor.php(135): Magento\ApplicationPerformanceMonitor\Plugin\ApplicationPerformanceMonitor->aroundLaunch()
#94 /var/www/magento/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\Http\Interceptor->Magento\Framework\Interception\{closure}()
#95 /var/www/magento/generated/code/Magento/Framework/App/Http/Interceptor.php(23): Magento\Framework\App\Http\Interceptor->___callPlugins()
#96 /var/www/magento/vendor/magento/framework/App/Bootstrap.php(264): Magento\Framework\App\Http\Interceptor->launch()
#97 /var/www/magento/pub/index.php(30): Magento\Framework\App\Bootstrap->run()
#98 {main}

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Magento 2.4 TypeError: reset error when accessing Payment Mehtods Configuration

The TypeError you're encountering (reset(): Argument #1 ($array) must be of type array, null given) in Magento 2.4.7 typically relates to configuration or module compatibility issues after an upgrade. To resolve this, consider checking:

  1. Module Compatibility: Ensure all installed modules are compatible with Magento 2.4.7.
  2. Cache and Compilation: Clear cache (bin/magento cache:flush) and recompile (bin/magento setup:di:compile).
  3. Logs and Error Reporting: Review Magento and server logs for detailed error messages.

If issues persist, consult Magento's documentation or community forums for further troubleshooting.

View solution in original post

2 REPLIES 2

Re: Magento 2.4 TypeError: reset error when accessing Payment Mehtods Configuration

The TypeError you're encountering (reset(): Argument #1 ($array) must be of type array, null given) in Magento 2.4.7 typically relates to configuration or module compatibility issues after an upgrade. To resolve this, consider checking:

  1. Module Compatibility: Ensure all installed modules are compatible with Magento 2.4.7.
  2. Cache and Compilation: Clear cache (bin/magento cache:flush) and recompile (bin/magento setup:di:compile).
  3. Logs and Error Reporting: Review Magento and server logs for detailed error messages.

If issues persist, consult Magento's documentation or community forums for further troubleshooting.

Re: Magento 2.4 TypeError: reset error when accessing Payment Mehtods Configuration

Thank you @steveroger1f23 it was a module.