All Magento product pages were working properly last week. Now I check that all product pages through exceptions.
1 exception(s): Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'referenceBlock', attribute 'after': The attribute 'after' is not allowed. Line: 1350 Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'referenceBlock', attribute 'after': The attribute 'after' is not allowed. Line: 1350 <pre>#1 Magento\Framework\Config\Dom->__construct() called at [vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:116] #2 Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject() called at [vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:66] #3 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create() called at [vendor/magento/framework/ObjectManager/ObjectManager.php:56] #4 Magento\Framework\ObjectManager\ObjectManager->create() called at [vendor/magento/framework/Config/DomFactory.php:43] #5 Magento\Framework\Config\DomFactory->createDom() called at [vendor/magento/framework/View/Model/Layout/Update/Validator.php:141] #6 Magento\Framework\View\Model\Layout\Update\Validator->isValid() called at [vendor/magento/framework/View/Model/Layout/Merge.php:494] #7 Magento\Framework\View\Model\Layout\Merge->_validateMergedLayout() called at [vendor/magento/framework/View/Model/Layout/Merge.php:470] #8 Magento\Framework\View\Model\Layout\Merge->load() called at [generated/code/Magento/Framework/View/Model/Layout/Merge/Interceptor.php:193] #9 Magento\Framework\View\Model\Layout\Merge\Interceptor->load() called at [vendor/magento/framework/View/Layout/Builder.php:86] #10 Magento\Framework\View\Layout\Builder->loadLayoutUpdates() called at [vendor/magento/framework/View/Layout/Builder.php:63] #11 Magento\Framework\View\Layout\Builder->build() called at [vendor/magento/framework/View/Layout.php:253] #12 Magento\Framework\View\Layout->build() called at [vendor/magento/framework/View/Layout.php:875] #13 Magento\Framework\View\Layout->getBlock() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:414] #14 Magento\Framework\View\Layout\Interceptor->getBlock() called at [vendor/magento/module-cms/Helper/Page.php:171] #15 Magento\Cms\Helper\Page->prepareResultPage() called at [vendor/magento/module-cms/Controller/Noroute/Index.php:47] #16 Magento\Cms\Controller\Noroute\Index->execute() called at [generated/code/Magento/Cms/Controller/Noroute/Index/Interceptor.php:24] #17 Magento\Cms\Controller\Noroute\Index\Interceptor->execute() called at [vendor/magento/framework/App/Action/Action.php:108] #18 Magento\Framework\App\Action\Action->dispatch() called at [vendor/magento/framework/Interception/Interceptor.php:58] #19 Magento\Cms\Controller\Noroute\Index\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138] #20 Magento\Cms\Controller\Noroute\Index\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153] #21 Magento\Cms\Controller\Noroute\Index\Interceptor->___callPlugins() called at [generated/code/Magento/Cms/Controller/Noroute/Index/Interceptor.php:39] #22 Magento\Cms\Controller\Noroute\Index\Interceptor->dispatch() called at [vendor/magento/framework/App/FrontController.php:159] #23 Magento\Framework\App\FrontController->processRequest() called at [vendor/magento/framework/App/FrontController.php:98] #24 Magento\Framework\App\FrontController->dispatch() called at [vendor/magento/framework/Interception/Interceptor.php:58] #25 Magento\Framework\App\FrontController\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138] #26 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php:94] #27 Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch() called at [vendor/magento/framework/Interception/Interceptor.php:135] #28 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php:69] #29 Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch() called at [vendor/magento/framework/Interception/Interceptor.php:135] #30 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153] #31 Magento\Framework\App\FrontController\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/App/FrontController/Interceptor.php:26] #32 Magento\Framework\App\FrontController\Interceptor->dispatch() called at [vendor/magento/framework/App/Http.php:137] #33 Magento\Framework\App\Http->launch() called at [generated/code/Magento/Framework/App/Http/Interceptor.php:24] #34 Magento\Framework\App\Http\Interceptor->launch() called at [vendor/magento/framework/App/Bootstrap.php:261] #35 Magento\Framework\App\Bootstrap->run() called at [index.php:39] </pre>
Solved! Go to Solution.
seems like you tried to change layout of your product page, in order to solve this issue, You have to remove after and before attribute from referenceBlock
you can use move tag for rearranging layout.
<move element="element name" destination="where you want to move" after="">
Hope it helps !
seems like you tried to change layout of your product page, in order to solve this issue, You have to remove after and before attribute from referenceBlock
you can use move tag for rearranging layout.
<move element="element name" destination="where you want to move" after="">
Hope it helps !
Hi this is core file how you can change this? I have same problem in 2.4.3 but I cant modify core file under vendor.
if problem comes from custom product pgae change why it reflects to magento core file?
I have the same error in magento 2.4.3... Could anyone please give me the correct answer for this error... I have met this error after completing my purchase...