1

I can access admin pannel (backend), but frontend localhost/magento will only display this.

I have run compile, upgrade, clean and flush commands.

Was working fine was only make changes to css styles. Looked in a few of the files but not clear what is wrong?

    1 exception(s):
Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'referenceContainer', attribute 'after': The attribute 'after' is not allowed.
Line: 743


Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'referenceContainer', attribute 'after': The attribute 'after' is not allowed.
Line: 743

#0 C:\xampp\htdocs\magento\vendor\magento\framework\Config\Dom.php(115): Magento\Framework\Config\Dom->_initDom('<layout xmlns:x...')
#1 C:\xampp\htdocs\magento\vendor\magento\framework\ObjectManager\Factory\AbstractFactory.php(111): Magento\Framework\Config\Dom->__construct('<layout xmlns:x...', Object(Magento\Framework\App\Arguments\ValidationState), Array, NULL, 'C:/xampp/htdocs...', '%message%\nLine:...')
#2 C:\xampp\htdocs\magento\vendor\magento\framework\ObjectManager\Factory\Dynamic\Developer.php(66): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\\Framewo...', Array)
#3 C:\xampp\htdocs\magento\vendor\magento\framework\ObjectManager\ObjectManager.php(56): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Framewo...', Array)
#4 C:\xampp\htdocs\magento\vendor\magento\framework\Config\DomFactory.php(42): Magento\Framework\ObjectManager\ObjectManager->create('Magento\\Framewo...', Array)
#5 C:\xampp\htdocs\magento\vendor\magento\framework\View\Model\Layout\Update\Validator.php(141): Magento\Framework\Config\DomFactory->createDom(Array)
#6 C:\xampp\htdocs\magento\vendor\magento\framework\View\Model\Layout\Merge.php(461): Magento\Framework\View\Model\Layout\Update\Validator->isValid('<layout xmlns:x...', 'layout_merged', false)
#7 C:\xampp\htdocs\magento\vendor\magento\framework\View\Model\Layout\Merge.php(442): Magento\Framework\View\Model\Layout\Merge->_validateMergedLayout('LAYOUT_frontend...', '<body>\n   <refe...')
#8 C:\xampp\htdocs\magento\generated\code\Magento\Framework\View\Model\Layout\Merge\Interceptor.php(193): Magento\Framework\View\Model\Layout\Merge->load(Array)
#9 C:\xampp\htdocs\magento\vendor\magento\framework\View\Layout\Builder.php(86): Magento\Framework\View\Model\Layout\Merge\Interceptor->load()
#10 C:\xampp\htdocs\magento\vendor\magento\framework\View\Layout\Builder.php(63): Magento\Framework\View\Layout\Builder->loadLayoutUpdates()
#11 C:\xampp\htdocs\magento\vendor\magento\framework\View\Layout.php(254): Magento\Framework\View\Layout\Builder->build()
#12 C:\xampp\htdocs\magento\vendor\magento\framework\View\Layout.php(875): Magento\Framework\View\Layout->build()
#13 C:\xampp\htdocs\magento\generated\code\Magento\Framework\View\Layout\Interceptor.php(414): Magento\Framework\View\Layout->getBlock('page_content_he...')
#14 C:\xampp\htdocs\magento\vendor\magento\module-cms\Helper\Page.php(171): Magento\Framework\View\Layout\Interceptor->getBlock('page_content_he...')
#15 C:\xampp\htdocs\magento\vendor\magento\module-cms\Controller\Index\Index.php(43): Magento\Cms\Helper\Page->prepareResultPage(Object(Magento\Cms\Controller\Index\Index\Interceptor), 'bege1')
#16 C:\xampp\htdocs\magento\generated\code\Magento\Cms\Controller\Index\Index\Interceptor.php(24): Magento\Cms\Controller\Index\Index->execute(NULL)
#17 C:\xampp\htdocs\magento\vendor\magento\framework\App\Action\Action.php(107): Magento\Cms\Controller\Index\Index\Interceptor->execute()
#18 C:\xampp\htdocs\magento\vendor\magento\framework\Interception\Interceptor.php(58): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#19 C:\xampp\htdocs\magento\vendor\magento\framework\Interception\Interceptor.php(138): Magento\Cms\Controller\Index\Index\Interceptor->___callParent('dispatch', Array)
#20 C:\xampp\htdocs\magento\vendor\magento\framework\Interception\Interceptor.php(153): Magento\Cms\Controller\Index\Index\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#21 C:\xampp\htdocs\magento\generated\code\Magento\Cms\Controller\Index\Index\Interceptor.php(39): Magento\Cms\Controller\Index\Index\Interceptor->___callPlugins('dispatch', Array, Array)
#22 C:\xampp\htdocs\magento\vendor\magento\framework\App\FrontController.php(55): Magento\Cms\Controller\Index\Index\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#23 C:\xampp\htdocs\magento\vendor\magento\framework\Interception\Interceptor.php(58): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#24 C:\xampp\htdocs\magento\vendor\magento\framework\Interception\Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#25 C:\xampp\htdocs\magento\vendor\magento\module-store\App\FrontController\Plugin\RequestPreprocessor.php(94): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#26 C:\xampp\htdocs\magento\vendor\magento\framework\Interception\Interceptor.php(135): Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#27 C:\xampp\htdocs\magento\vendor\magento\module-page-cache\Model\App\FrontController\BuiltinPlugin.php(73): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#28 C:\xampp\htdocs\magento\vendor\magento\framework\Interception\Interceptor.php(135): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#29 C:\xampp\htdocs\magento\vendor\magento\framework\Interception\Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#30 C:\xampp\htdocs\magento\generated\code\Magento\Framework\App\FrontController\Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, NULL)
#31 C:\xampp\htdocs\magento\vendor\magento\framework\App\Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#32 C:\xampp\htdocs\magento\generated\code\Magento\Framework\App\Http\Interceptor.php(24): Magento\Framework\App\Http->launch()
#33 C:\xampp\htdocs\magento\vendor\magento\framework\App\Bootstrap.php(256): Magento\Framework\App\Http\Interceptor->launch()
#34 C:\xampp\htdocs\magento\index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#35 {main}

Thanks

1 Answer 1

1

You have to remove the after and before attributes from referenceContainer in your .xml, clean the cache then refresh, it should work.

If you want to reorder your container, use the move attribute like this:

<move element="containerName" destination="destinationElementName" before="-"/>
6
  • cache has been refreshed/cleared. what .xml file are you referring too?
    – Tiff13
    Commented Mar 25, 2018 at 0:02
  • you refresh the cache after removing these attributes, euhh the xml i dont know, check what you have changed recently, maybe in default.xml or in some layout module or ... you're the only one who knows what has been changed in your Magento
    – PЯINCƎ
    Commented Mar 25, 2018 at 0:19
  • That's the thing - i haven't changed anything. This attribute doesn't exist in the 15+ i've looked in. Thank you i'll keep searching, it's something more going on here.
    – Tiff13
    Commented Mar 25, 2018 at 0:31
  • Actually, @prince answer is correct. The thing is that there are MANY layout XML files you may need to look in, quite possibly more than 15. Commented Mar 25, 2018 at 0:37
  • thanks @Shawn Abramson, that's what I'm trying to explain to him but he says no, but im sure when he goes find these attributes he will tell me oh Prince it's true you were right and now it works and I'm happy :)
    – PЯINCƎ
    Commented Mar 25, 2018 at 0:53

Your Answer

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

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