I have some old code that's causing issues for my and I cannot go to tax configuration because of it. Can you point all the files and tables I should check to remove this error?
I have fixed directory_country_region_name table, which had some custom values. But what should I look for now?
1 exception(s):
Exception #0 (Exception): Notice: Undefined index: BC in /vendor/magento/module-directory/Model/Config/Source/Allregion.php on line 92
Exception #0 (Exception): Notice: Undefined index: BC in /vendor/magento/module-directory/Model/Config/Source/Allregion.php on line 92
#0 /vendor/magento/module-directory/Model/Config/Source/Allregion.php(92): Magento\Framework\App\ErrorHandler->handler(8, 'Undefined index...', '/var/www/client...', 92, Array)
#1 [internal function]: Magento\Directory\Model\Config\Source\Allregion->sortRegionCountries('BC', 'ES')
#2 /vendor/magento/module-directory/Model/Config/Source/Allregion.php(66): uksort(Array, Array)
#3 /vendor/magento/module-config/Model/Config/Structure/Element/Field.php(458): Magento\Directory\Model\Config\Source\Allregion->toOptionArray(false)
#4 /vendor/magento/module-config/Model/Config/Structure/Element/Field.php(376): Magento\Config\Model\Config\Structure\Element\Field->_getOptionsFromSourceModel(Object(Magento\Directory\Model\Config\Source\Allregion))
#5 /generated/code/Magento/Config/Model/Config/Structure/Element/Field/Interceptor.php(323): Magento\Config\Model\Config\Structure\Element\Field->getOptions()
#6 /vendor/magento/module-config/Block/System/Config/Form.php(404): Magento\Config\Model\Config\Structure\Element\Field\Interceptor->getOptions()
#7 /vendor/magento/module-config/Block/System/Config/Form.php(325): Magento\Config\Block\System\Config\Form->_initElement(Object(Magento\Config\Model\Config\Structure\Element\Field\Interceptor), Object(Magento\Framework\Data\Form\Element\Fieldset), 'tax/vertex_sell...', '', '')
#8 /vendor/magento/module-config/Block/System/Config/Form.php(265): Magento\Config\Block\System\Config\Form->initFields(Object(Magento\Framework\Data\Form\Element\Fieldset), Object(Magento\Config\Model\Config\Structure\Element\Group\Interceptor), Object(Magento\Config\Model\Config\Structure\Element\Section))
#9 /vendor/magento/module-config/Block/System/Config/Form.php(211): Magento\Config\Block\System\Config\Form->_initGroup(Object(Magento\Config\Model\Config\Structure\Element\Group\Interceptor), Object(Magento\Config\Model\Config\Structure\Element\Section), Object(Magento\Framework\Data\Form))
#10 /vendor/magento/module-config/Block/System/Config/Form.php(548): Magento\Config\Block\System\Config\Form->initForm()
#11 /vendor/magento/framework/View/Element/AbstractBlock.php(666): Magento\Config\Block\System\Config\Form->_beforeToHtml()
#12 /vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Element\AbstractBlock->toHtml()
#13 /vendor/magento/framework/View/Layout.php(533): Magento\Framework\View\Layout->_renderBlock('system\\config\\f...')
#14 /generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('system\\config\\f...')
#15 /vendor/magento/framework/View/Layout.php(488): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('system\\config\\f...')
#16 /generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('system\\config\\f...', true)
#17 /vendor/magento/framework/View/Element/AbstractBlock.php(507): Magento\Framework\View\Layout\Interceptor->renderElement('system\\config\\f...', true)
#18 /vendor/magento/module-config/view/adminhtml/templates/system/config/edit.phtml(22): Magento\Framework\View\Element\AbstractBlock->getChildHtml('form')
#19 /vendor/magento/framework/View/TemplateEngine/Php.php(59): include('/var/www/client...')
#20 /vendor/magento/framework/View/Element/Template.php(270): Magento\Framework\View\TemplateEngine\Php->render(Object(Magento\Config\Block\System\Config\Edit), '/var/www/client...', Array)
#21 /vendor/magento/framework/View/Element/Template.php(300): Magento\Framework\View\Element\Template->fetchView('/var/www/client...')
#22 /vendor/magento/module-backend/Block/Template.php(126): Magento\Framework\View\Element\Template->_toHtml()
#23 /vendor/magento/framework/View/Element/AbstractBlock.php(667): Magento\Backend\Block\Template->_toHtml()
#24 /vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Element\AbstractBlock->toHtml()
#25 /vendor/magento/framework/View/Layout.php(533): Magento\Framework\View\Layout->_renderBlock('system.config.e...')
#26 /generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('system.config.e...')
#27 /vendor/magento/framework/View/Layout.php(488): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('system.config.e...')
#28 /generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('system.config.e...', false)
#29 /vendor/magento/framework/View/Layout.php(585): Magento\Framework\View\Layout\Interceptor->renderElement('system.config.e...', false)
#30 /vendor/magento/framework/View/Layout.php(535): Magento\Framework\View\Layout->_renderContainer('content', false)
#31 /generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('content')
#32 /vendor/magento/framework/View/Layout.php(488): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('content')
#33 /generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('content', false)
#34 /vendor/magento/framework/View/Layout.php(585): Magento\Framework\View\Layout\Interceptor->renderElement('content', false)
#35 /vendor/magento/framework/View/Layout.php(535): Magento\Framework\View\Layout->_renderContainer('admin.scope.col...', false)
#36 /generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('admin.scope.col...')
#37 /vendor/magento/framework/View/Layout.php(488): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('admin.scope.col...')
#38 /generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('admin.scope.col...', false)
#39 /vendor/magento/framework/View/Layout.php(585): Magento\Framework\View\Layout\Interceptor->renderElement('admin.scope.col...', false)
#40 /vendor/magento/framework/View/Layout.php(535): Magento\Framework\View\Layout->_renderContainer('main.col', false)
#41 /generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('main.col')
#42 /vendor/magento/framework/View/Layout.php(488): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('main.col')
#43 /generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('main.col', false)
#44 /vendor/magento/framework/View/Layout.php(585): Magento\Framework\View\Layout\Interceptor->renderElement('main.col', false)
#45 /vendor/magento/framework/View/Layout.php(535): Magento\Framework\View\Layout->_renderContainer('page.main.conta...', false)
#46 /generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('page.main.conta...')
#47 /vendor/magento/framework/View/Layout.php(488): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('page.main.conta...')
#48 /generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('page.main.conta...', false)
#49 /vendor/magento/framework/View/Layout.php(585): Magento\Framework\View\Layout\Interceptor->renderElement('page.main.conta...', false)
#50 /vendor/magento/framework/View/Layout.php(535): Magento\Framework\View\Layout->_renderContainer('page.content', false)
#51 /generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('page.content')
#52 /vendor/magento/framework/View/Layout.php(488): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('page.content')
#53 /generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('page.content', false)
#54 /vendor/magento/framework/View/Layout.php(585): Magento\Framework\View\Layout\Interceptor->renderElement('page.content', false)
#55 /vendor/magento/framework/View/Layout.php(535): Magento\Framework\View\Layout->_renderContainer('page.wrapper', false)
#56 /generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('page.wrapper')
#57 /vendor/magento/framework/View/Layout.php(488): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('page.wrapper')
#58 /generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('page.wrapper', false)
#59 /vendor/magento/framework/View/Layout.php(585): Magento\Framework\View\Layout\Interceptor->renderElement('page.wrapper', false)
#60 /vendor/magento/framework/View/Layout.php(535): Magento\Framework\View\Layout->_renderContainer('backend.page', false)
#61 /generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('backend.page')
#62 /vendor/magento/framework/View/Layout.php(488): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('backend.page')
#63 /generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('backend.page', false)
#64 /vendor/magento/framework/View/Layout.php(585): Magento\Framework\View\Layout\Interceptor->renderElement('backend.page', false)
#65 /vendor/magento/framework/View/Layout.php(535): Magento\Framework\View\Layout->_renderContainer('root', false)
#66 /generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('root')
#67 /vendor/magento/framework/View/Layout.php(488): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('root')
#68 /generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('root', true)
#69 /vendor/magento/framework/View/Layout.php(954): Magento\Framework\View\Layout\Interceptor->renderElement('root')
#70 /generated/code/Magento/Framework/View/Layout/Interceptor.php(492): Magento\Framework\View\Layout->getOutput()
#71 /vendor/magento/framework/View/Result/Page.php(257): Magento\Framework\View\Layout\Interceptor->getOutput()
#72 /vendor/magento/framework/View/Result/Layout.php(170): Magento\Framework\View\Result\Page->render(Object(Magento\Framework\App\Response\Http\Interceptor))
#73 /generated/code/Magento/Backend/Model/View/Result/Page/Interceptor.php(193): Magento\Framework\View\Result\Layout->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#74 /vendor/magento/framework/App/Http.php(139): Magento\Backend\Model\View\Result\Page\Interceptor->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#75 /vendor/magento/framework/App/Bootstrap.php(257): Magento\Framework\App\Http->launch()
#76 /index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#77 {main}
Solved! Go to Solution.
Just fyi I fixed this issue a while ago. If anybody wants my troubleshooting steps here they are:
1. I downloaded a copy of the database and did a manual search for the specific bad entry and deleted it.
2. Deleted the custom country entry from the .xml country config files. To find it I just did some full folder searches for the specific string.
Hope someone will find this useful to fix a mistake in their code.
Are you using any third party/custom extension which affects the region field?
If so, try to disable that module from app/etc/config.php and then check if the error is gone.
If the error is in custom extension, then there will be some mistake in the system.xml file or your region array which has been created in the custom extension.
Just fyi I fixed this issue a while ago. If anybody wants my troubleshooting steps here they are:
1. I downloaded a copy of the database and did a manual search for the specific bad entry and deleted it.
2. Deleted the custom country entry from the .xml country config files. To find it I just did some full folder searches for the specific string.
Hope someone will find this useful to fix a mistake in their code.
.
I have this issue
how I can solved him
1 exception(s): Exception #0 (Exception): Notice: Undefined property: Magento\Framework\View\Element\Template::$_productRepositoryFactory in C:\wamp64\www\kalimatm2\vendor\magento\framework\View\TemplateEngine\Php.php on line 110 Exception #0 (Exception): Notice: Undefined property: Magento\Framework\View\Element\Template::$_productRepositoryFactory in C:\wamp64\www\kalimatm2\vendor\magento\framework\View\TemplateEngine\Php.php on line 110 <pre>#1 Magento\Framework\View\TemplateEngine\Php->__get('_productReposito...') called at [generated\code\Magento\Framework\View\TemplateEngine\Php\Interceptor.php:63] #2 Magento\Framework\View\TemplateEngine\Php\Interceptor->__get('_productReposito...') called at [app\design\frontend\Magento\default\Magento_Catalog\templates\cartitems.phtml:63] #3 include('C:\wamp64\www\ka...') called at [vendor\magento\framework\View\TemplateEngine\Php.php:59] #4 Magento\Framework\View\TemplateEngine\Php->render(&Magento\Framework\View\Element\Template#000000000d94758c000000000ecd3e71#, 'C:/wamp64/www/ka...', array('csp' => &Magento\Csp\Helper\InlineUtil#000000000d947af7000000000ecd3e71#)) called at [vendor\magento\framework\Interception\Interceptor.php:58] #5 Magento\Framework\View\TemplateEngine\Php\Interceptor->___callParent('render', array(&Magento\Framework\View\Element\Template#000000000d94758c000000000ecd3e71#, 'C:/wamp64/www/ka...', array('csp' => &Magento\Csp\Helper\InlineUtil#000000000d947af7000000000ecd3e71#))) called at [vendor\magento\framework\Interception\Interceptor.php:138] #6 Magento\Framework\View\TemplateEngine\Php\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\View\Element\Template#000000000d94758c000000000ecd3e71#, 'C:/wamp64/www/ka...', array()) called at [vendor\magento\framework\Interception\Interceptor.php:153] #7 Magento\Framework\View\TemplateEngine\Php\Interceptor->___callPlugins('render', array(&Magento\Framework\View\Element\Template#000000000d94758c000000000ecd3e71#, 'C:/wamp64/www/ka...', array()), array(array('csp_helper_plugi...'))) called at [generated\code\Magento\Framework\View\TemplateEngine\Php\Interceptor.php:26] #8 Magento\Framework\View\TemplateEngine\Php\Interceptor->render(&Magento\Framework\View\Element\Template#000000000d94758c000000000ecd3e71#, 'C:/wamp64/www/ka...', array()) called at [vendor\magento\framework\View\Element\Template.php:271] #9 Magento\Framework\View\Element\Template->fetchView('C:/wamp64/www/ka...') called at [vendor\magento\framework\View\Element\Template.php:301] #10 Magento\Framework\View\Element\Template->_toHtml() called at [vendor\magento\framework\View\Element\AbstractBlock.php:1100] #11 Magento\Framework\View\Element\AbstractBlock->Magento\Framework\View\Element\{closure}() called at [vendor\magento\framework\View\Element\AbstractBlock.php:1104] #12 Magento\Framework\View\Element\AbstractBlock->_loadCache() called at [vendor\magento\framework\View\Element\AbstractBlock.php:674] #13 Magento\Framework\View\Element\AbstractBlock->toHtml() called at [vendor\magento\framework\View\Layout.php:566] #14 Magento\Framework\View\Layout->_renderBlock('cartitems') called at [vendor\magento\framework\View\Layout.php:542] #15 Magento\Framework\View\Layout->renderNonCachedElement('cartitems') called at [generated\code\Magento\Framework\View\Layout\Interceptor.php:206] #16 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('cartitems') called at [vendor\magento\framework\View\Layout.php:497] #17 Magento\Framework\View\Layout->renderElement('cartitems', false) called at [generated\code\Magento\Framework\View\Layout\Interceptor.php:193] #18 Magento\Framework\View\Layout\Interceptor->renderElement('cartitems', false) called at [vendor\magento\framework\View\Layout.php:594] #19 Magento\Framework\View\Layout->_renderContainer('sidebar.addition...', false) called at [vendor\magento\framework\View\Layout.php:544] #20 Magento\Framework\View\Layout->renderNonCachedElement('sidebar.addition...') called at [generated\code\Magento\Framework\View\Layout\Interceptor.php:206] #21 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('sidebar.addition...') called at [vendor\magento\framework\View\Layout.php:497] #22 Magento\Framework\View\Layout->renderElement('sidebar.addition...', false) called at [generated\code\Magento\Framework\View\Layout\Interceptor.php:193] #23 Magento\Framework\View\Layout\Interceptor->renderElement('sidebar.addition...', false) called at [vendor\magento\framework\View\Layout.php:594] #24 Magento\Framework\View\Layout->_renderContainer('div.sidebar.addi...', false) called at [vendor\magento\framework\View\Layout.php:544] #25 Magento\Framework\View\Layout->renderNonCachedElement('div.sidebar.addi...') called at [generated\code\Magento\Framework\View\Layout\Interceptor.php:206] #26 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('div.sidebar.addi...') called at [vendor\magento\framework\View\Layout.php:497] #27 Magento\Framework\View\Layout->renderElement('div.sidebar.addi...', false) called at [generated\code\Magento\Framework\View\Layout\Interceptor.php:193] #28 Magento\Framework\View\Layout\Interceptor->renderElement('div.sidebar.addi...', false) called at [vendor\magento\framework\View\Layout.php:594] #29 Magento\Framework\View\Layout->_renderContainer('columns', false) called at [vendor\magento\framework\View\Layout.php:544] #30 Magento\Framework\View\Layout->renderNonCachedElement('columns') called at [generated\code\Magento\Framework\View\Layout\Interceptor.php:206] #31 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('columns') called at [vendor\magento\framework\View\Layout.php:497] #32 Magento\Framework\View\Layout->renderElement('columns', false) called at [generated\code\Magento\Framework\View\Layout\Interceptor.php:193] #33 Magento\Framework\View\Layout\Interceptor->renderElement('columns', false) called at [vendor\magento\framework\View\Layout.php:594] #34 Magento\Framework\View\Layout->_renderContainer('main.content', false) called at [vendor\magento\framework\View\Layout.php:544] #35 Magento\Framework\View\Layout->renderNonCachedElement('main.content') called at [generated\code\Magento\Framework\View\Layout\Interceptor.php:206] #36 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('main.content') called at [vendor\magento\framework\View\Layout.php:497] #37 Magento\Framework\View\Layout->renderElement('main.content', false) called at [generated\code\Magento\Framework\View\Layout\Interceptor.php:193] #38 Magento\Framework\View\Layout\Interceptor->renderElement('main.content', false) called at [vendor\magento\framework\View\Layout.php:594] #39 Magento\Framework\View\Layout->_renderContainer('page.wrapper', false) called at [vendor\magento\framework\View\Layout.php:544] #40 Magento\Framework\View\Layout->renderNonCachedElement('page.wrapper') called at [generated\code\Magento\Framework\View\Layout\Interceptor.php:206] #41 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('page.wrapper') called at [vendor\magento\framework\View\Layout.php:497] #42 Magento\Framework\View\Layout->renderElement('page.wrapper', false) called at [generated\code\Magento\Framework\View\Layout\Interceptor.php:193] #43 Magento\Framework\View\Layout\Interceptor->renderElement('page.wrapper', false) called at [vendor\magento\framework\View\Layout.php:594] #44 Magento\Framework\View\Layout->_renderContainer('root', false) called at [vendor\magento\framework\View\Layout.php:544] #45 Magento\Framework\View\Layout->renderNonCachedElement('root') called at [generated\code\Magento\Framework\View\Layout\Interceptor.php:206] #46 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('root') called at [vendor\magento\framework\View\Layout.php:497] #47 Magento\Framework\View\Layout->renderElement('root', true) called at [generated\code\Magento\Framework\View\Layout\Interceptor.php:193] #48 Magento\Framework\View\Layout\Interceptor->renderElement('root') called at [vendor\magento\framework\View\Layout.php:963] #49 Magento\Framework\View\Layout->getOutput() called at [vendor\magento\framework\Interception\Interceptor.php:58] #50 Magento\Framework\View\Layout\Interceptor->___callParent('getOutput', array()) called at [vendor\magento\framework\Interception\Interceptor.php:138] #51 Magento\Framework\View\Layout\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor\magento\framework\Interception\Interceptor.php:153] #52 Magento\Framework\View\Layout\Interceptor->___callPlugins('getOutput', array(), array(array('layout-model-cac...'))) called at [generated\code\Magento\Framework\View\Layout\Interceptor.php:494] #53 Magento\Framework\View\Layout\Interceptor->getOutput() called at [vendor\magento\framework\View\Result\Page.php:258] #54 Magento\Framework\View\Result\Page->render(&Magento\Framework\App\Response\Http\Interceptor#000000000d947234000000000ecd3e71#) called at [vendor\magento\framework\View\Result\Layout.php:171] #55 Magento\Framework\View\Result\Layout->renderResult(&Magento\Framework\App\Response\Http\Interceptor#000000000d947234000000000ecd3e71#) called at [vendor\magento\framework\Interception\Interceptor.php:58] #56 Magento\Framework\View\Result\Page\Interceptor->___callParent('renderResult', array(&Magento\Framework\App\Response\Http\Interceptor#000000000d947234000000000ecd3e71#)) called at [vendor\magento\framework\Interception\Interceptor.php:138] #57 Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Response\Http\Interceptor#000000000d947234000000000ecd3e71#) called at [vendor\magento\framework\Interception\Interceptor.php:153] #58 Magento\Framework\View\Result\Page\Interceptor->___callPlugins('renderResult', array(&Magento\Framework\App\Response\Http\Interceptor#000000000d947234000000000ecd3e71#), array(array('result-messages', 'result-builtin-c...', 'result-varnish-c...'))) called at [generated\code\Magento\Framework\View\Result\Page\Interceptor.php:130] #59 Magento\Framework\View\Result\Page\Interceptor->renderResult(&Magento\Framework\App\Response\Http\Interceptor#000000000d947234000000000ecd3e71#) called at [vendor\magento\framework\App\Http.php:120] #60 Magento\Framework\App\Http->launch() called at [generated\code\Magento\Framework\App\Http\Interceptor.php:24] #61 Magento\Framework\App\Http\Interceptor->launch() called at [vendor\magento\framework\App\Bootstrap.php:261] #62 Magento\Framework\App\Bootstrap->run(&Magento\Framework\App\Http\Interceptor#000000000d94722f000000000ecd3e71#) called at [index.php:39] </pre>