cancel
Showing results for 
Search instead for 
Did you mean: 

Exeption error after upgrading to magento 2.2.2

SOLVED

Exeption error after upgrading to magento 2.2.2

Hi,

 

I have been building a theme for my website, I was using magento 2.1.

We decided to upgrade magento to the latest version but my blocks that I have built started to give me errors.

 

this is the error page I am getting, but I cannot figure out what could cause this problem:

1 exception(s):
Exception #0 (Magento\Framework\Exception\ValidatorException): Invalid template file: 'Bitsbytes_Categories::default/categories.phtml' in module: 'Bitsbytes_Categories' block's name: 'main_schedule_block0'

Exception #0 (Magento\Framework\Exception\ValidatorException): Invalid template file: 'Bitsbytes_Categories::default/categories.phtml' in module: 'Bitsbytes_Categories' block's name: 'main_schedule_block0'
#0 C:\xampp\htdocs\vendor\magento\framework\View\Element\Template.php(300): Magento\Framework\View\Element\Template->fetchView(false)
#1 C:\xampp\htdocs\vendor\magento\framework\View\Element\AbstractBlock.php(667): Magento\Framework\View\Element\Template->_toHtml()
#2 C:\xampp\htdocs\vendor\magento\framework\View\Layout.php(558): Magento\Framework\View\Element\AbstractBlock->toHtml()
#3 C:\xampp\htdocs\vendor\magento\framework\View\Layout.php(534): Magento\Framework\View\Layout->_renderBlock('main_schedule_b...')
#4 C:\xampp\htdocs\generated\code\Magento\Framework\View\Layout\Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('main_schedule_b...')
#5 C:\xampp\htdocs\vendor\magento\framework\View\Layout.php(489): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('main_schedule_b...')
#6 C:\xampp\htdocs\generated\code\Magento\Framework\View\Layout\Interceptor.php(193): Magento\Framework\View\Layout->renderElement('main_schedule_b...', true)
#7 C:\xampp\htdocs\vendor\magento\framework\View\Layout.php(585): Magento\Framework\View\Layout\Interceptor->renderElement('main_schedule_b...')
#8 C:\xampp\htdocs\vendor\magento\framework\View\Layout.php(536): Magento\Framework\View\Layout->_renderContainer('main')
#9 C:\xampp\htdocs\generated\code\Magento\Framework\View\Layout\Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('main')
#10 C:\xampp\htdocs\vendor\magento\framework\View\Layout.php(489): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('main')
#11 C:\xampp\htdocs\generated\code\Magento\Framework\View\Layout\Interceptor.php(193): Magento\Framework\View\Layout->renderElement('main', true)
#12 C:\xampp\htdocs\vendor\magento\framework\View\Layout.php(585): Magento\Framework\View\Layout\Interceptor->renderElement('main')
#13 C:\xampp\htdocs\vendor\magento\framework\View\Layout.php(536): Magento\Framework\View\Layout->_renderContainer('columns')
#14 C:\xampp\htdocs\generated\code\Magento\Framework\View\Layout\Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('columns')
#15 C:\xampp\htdocs\vendor\magento\framework\View\Layout.php(489): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('columns')
#16 C:\xampp\htdocs\generated\code\Magento\Framework\View\Layout\Interceptor.php(193): Magento\Framework\View\Layout->renderElement('columns', true)
#17 C:\xampp\htdocs\vendor\magento\framework\View\Layout.php(585): Magento\Framework\View\Layout\Interceptor->renderElement('columns')
#18 C:\xampp\htdocs\vendor\magento\framework\View\Layout.php(536): Magento\Framework\View\Layout->_renderContainer('main.content')
#19 C:\xampp\htdocs\generated\code\Magento\Framework\View\Layout\Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('main.content')
#20 C:\xampp\htdocs\vendor\magento\framework\View\Layout.php(489): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('main.content')
#21 C:\xampp\htdocs\generated\code\Magento\Framework\View\Layout\Interceptor.php(193): Magento\Framework\View\Layout->renderElement('main.content', true)
#22 C:\xampp\htdocs\vendor\magento\framework\View\Layout.php(585): Magento\Framework\View\Layout\Interceptor->renderElement('main.content')
#23 C:\xampp\htdocs\vendor\magento\framework\View\Layout.php(536): Magento\Framework\View\Layout->_renderContainer('page.wrapper')
#24 C:\xampp\htdocs\generated\code\Magento\Framework\View\Layout\Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('page.wrapper')
#25 C:\xampp\htdocs\vendor\magento\framework\View\Layout.php(489): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('page.wrapper')
#26 C:\xampp\htdocs\generated\code\Magento\Framework\View\Layout\Interceptor.php(193): Magento\Framework\View\Layout->renderElement('page.wrapper', true)
#27 C:\xampp\htdocs\vendor\magento\framework\View\Layout.php(585): Magento\Framework\View\Layout\Interceptor->renderElement('page.wrapper')
#28 C:\xampp\htdocs\vendor\magento\framework\View\Layout.php(536): Magento\Framework\View\Layout->_renderContainer('root')
#29 C:\xampp\htdocs\generated\code\Magento\Framework\View\Layout\Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('root')
#30 C:\xampp\htdocs\vendor\magento\framework\View\Layout.php(489): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('root')
#31 C:\xampp\htdocs\generated\code\Magento\Framework\View\Layout\Interceptor.php(193): Magento\Framework\View\Layout->renderElement('root', true)
#32 C:\xampp\htdocs\vendor\magento\framework\View\Layout.php(954): Magento\Framework\View\Layout\Interceptor->renderElement('root')
#33 C:\xampp\htdocs\vendor\magento\framework\Interception\Interceptor.php(58): Magento\Framework\View\Layout->getOutput()
#34 C:\xampp\htdocs\vendor\magento\framework\Interception\Interceptor.php(138): Magento\Framework\View\Layout\Interceptor->___callParent('getOutput', Array)
#35 C:\xampp\htdocs\vendor\magento\framework\Interception\Interceptor.php(153): Magento\Framework\View\Layout\Interceptor->Magento\Framework\Interception\{closure}()
#36 C:\xampp\htdocs\generated\code\Magento\Framework\View\Layout\Interceptor.php(494): Magento\Framework\View\Layout\Interceptor->___callPlugins('getOutput', Array, Array)
#37 C:\xampp\htdocs\vendor\magento\framework\View\Result\Page.php(257): Magento\Framework\View\Layout\Interceptor->getOutput()
#38 C:\xampp\htdocs\vendor\magento\framework\View\Result\Layout.php(170): Magento\Framework\View\Result\Page->render(Object(Magento\Framework\App\Response\Http\Interceptor))
#39 C:\xampp\htdocs\vendor\magento\framework\Interception\Interceptor.php(58): Magento\Framework\View\Result\Layout->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#40 C:\xampp\htdocs\vendor\magento\framework\Interception\Interceptor.php(138): Magento\Framework\View\Result\Page\Interceptor->___callParent('renderResult', Array)
#41 C:\xampp\htdocs\vendor\magento\framework\Interception\Interceptor.php(153): Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Response\Http\Interceptor))
#42 C:\xampp\htdocs\generated\code\Magento\Framework\View\Result\Page\Interceptor.php(130): Magento\Framework\View\Result\Page\Interceptor->___callPlugins('renderResult', Array, Array)
#43 C:\xampp\htdocs\vendor\magento\framework\App\Http.php(139): Magento\Framework\View\Result\Page\Interceptor->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#44 C:\xampp\htdocs\vendor\magento\framework\App\Bootstrap.php(256): Magento\Framework\App\Http->launch()
#45 C:\xampp\htdocs\index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#46 {main}
1 ACCEPTED SOLUTION

Accepted Solutions

Re: Exeption error after upgrading to magento 2.2.2

I managed to solve the problem. the solution was to name the xml file found in view\frontend\layout\ according to this format:

{router_id}_{controller_name}_{action_name}.xml

then it worked fine.

View solution in original post

1 REPLY 1

Re: Exeption error after upgrading to magento 2.2.2

I managed to solve the problem. the solution was to name the xml file found in view\frontend\layout\ according to this format:

{router_id}_{controller_name}_{action_name}.xml

then it worked fine.