Skip to content

After changing to developer mode, I am facing the following error

My site is working perfectly until I change it to developer mode

Product page & News event page showing error. All other pages are working fine

Magento 2.3.5 p1 — PHP 7.3.3 — MYSQL 5.7 — Apache 2.4

Facing this error:

1 exception(s):
Exception #0 (MagentoFrameworkConfigDomValidationException): Element 'remove': This element is not expected. Expected is one of ( attribute, block, referenceBlock, referenceContainer, container, move, uiComponent ).
Line: 1592


Exception #0 (MagentoFrameworkConfigDomValidationException): Element 'remove': This element is not expected. Expected is one of ( attribute, block, referenceBlock, referenceContainer, container, move, uiComponent ).
Line: 1592

<pre>#1 MagentoFrameworkConfigDom->__construct('<layout xmlns:xs...', &MagentoFrameworkAppArgumentsValidationState#00000000043860b1000000003ce7d63e#, array(), NULL, '/var/www/html/na...', '%message%nLine: ...') called at [vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:121]
#2 MagentoFrameworkObjectManagerFactoryAbstractFactory->createObject('MagentoFramewor...', array('<layout xmlns:xs...', &MagentoFrameworkAppArgumentsValidationState#00000000043860b1000000003ce7d63e#, array(), NULL, '/var/www/html/na...', '%message%nLine: ...')) called at [vendor/magento/framework/ObjectManager/Factory/Compiled.php:108]
#3 MagentoFrameworkObjectManagerFactoryCompiled->create('MagentoFramewor...', array('xml' => '<layout xmlns:xs...', 'schemaFile' => '/var/www/html/na...', 'validationState' => &MagentoFrameworkAppArgumentsValidationState#00000000043860b1000000003ce7d63e#)) called at [vendor/magento/framework/ObjectManager/ObjectManager.php:56]
#4 MagentoFrameworkObjectManagerObjectManager->create('MagentoFramewor...', array('xml' => '<layout xmlns:xs...', 'schemaFile' => '/var/www/html/na...', 'validationState' => &MagentoFrameworkAppArgumentsValidationState#00000000043860b1000000003ce7d63e#)) called at [vendor/magento/framework/Config/DomFactory.php:43]
#5 MagentoFrameworkConfigDomFactory->createDom(array('xml' => '<layout xmlns:xs...', 'schemaFile' => '/var/www/html/na...', 'validationState' => &MagentoFrameworkAppArgumentsValidationState#00000000043860b1000000003ce7d63e#)) called at [vendor/magento/framework/View/Model/Layout/Update/Validator.php:141]
#6 MagentoFrameworkViewModelLayoutUpdateValidator->isValid('<layout xmlns:xs...', 'layout_merged', false) called at [vendor/magento/framework/View/Model/Layout/Merge.php:512]
#7 MagentoFrameworkViewModelLayoutMerge->_validateMergedLayout('LAYOUT_frontend_...', '<body>n   <refer...') called at [vendor/magento/framework/View/Model/Layout/Merge.php:488]
#8 MagentoFrameworkViewModelLayoutMerge->load() called at [vendor/magento/framework/View/Layout/Builder.php:86]
#9 MagentoFrameworkViewLayoutBuilder->loadLayoutUpdates() called at [vendor/magento/framework/View/Layout/Builder.php:63]
#10 MagentoFrameworkViewLayoutBuilder->build() called at [vendor/magento/framework/View/Layout.php:259]
#11 MagentoFrameworkViewLayout->build() called at [vendor/magento/framework/View/Layout.php:884]
#12 MagentoFrameworkViewLayout->getBlock('page_content_hea...') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:414]
#13 MagentoFrameworkViewLayoutInterceptor->getBlock('page_content_hea...') called at [vendor/magento/module-cms/Helper/Page.php:215]
#14 MagentoCmsHelperPage->prepareResultPage(&MagentoCmsControllerNorouteIndexInterceptor#0000000004386702000000003ce7d63e#, 'no-route') called at [vendor/magento/module-cms/Controller/Noroute/Index.php:47]
#15 MagentoCmsControllerNorouteIndex->execute() called at [vendor/magento/framework/App/Action/Action.php:108]
#16 MagentoFrameworkAppActionAction->dispatch(&MagentoFrameworkAppRequestHttp#0000000004386143000000003ce7d63e#) called at [vendor/magento/framework/Interception/Interceptor.php:58]
#17 MagentoCmsControllerNorouteIndexInterceptor->___callParent('dispatch', array(&MagentoFrameworkAppRequestHttp#0000000004386143000000003ce7d63e#)) called at [vendor/magento/framework/Interception/Interceptor.php:138]
#18 MagentoCmsControllerNorouteIndexInterceptor->MagentoFrameworkInterception{closure}(&MagentoFrameworkAppRequestHttp#0000000004386143000000003ce7d63e#) called at [vendor/magento/framework/Interception/Interceptor.php:153]
#19 MagentoCmsControllerNorouteIndexInterceptor->___callPlugins('dispatch', array(&MagentoFrameworkAppRequestHttp#0000000004386143000000003ce7d63e#), array(array('designLoader', 'customerNotifica...', 'catalog_app_acti...', 'tax-app-action-d...', 'weee-app-action-...', 'storeCheck', 'contextPlugin', 'customer-app-act...'))) called at [generated/code/Magento/Cms/Controller/Noroute/Index/Interceptor.php:26]
#20 MagentoCmsControllerNorouteIndexInterceptor->dispatch(&MagentoFrameworkAppRequestHttp#0000000004386143000000003ce7d63e#) called at [vendor/magento/framework/App/FrontController.php:162]
#21 MagentoFrameworkAppFrontController->processRequest(&MagentoFrameworkAppRequestHttp#0000000004386143000000003ce7d63e#, &MagentoCmsControllerNorouteIndexInterceptor#0000000004386702000000003ce7d63e#) called at [vendor/magento/framework/App/FrontController.php:98]
#22 MagentoFrameworkAppFrontController->dispatch(&MagentoFrameworkAppRequestHttp#0000000004386143000000003ce7d63e#) called at [vendor/magento/framework/Interception/Interceptor.php:58]
#23 MagentoFrameworkAppFrontControllerInterceptor->___callParent('dispatch', array(&MagentoFrameworkAppRequestHttp#0000000004386143000000003ce7d63e#)) called at [vendor/magento/framework/Interception/Interceptor.php:138]
#24 MagentoFrameworkAppFrontControllerInterceptor->MagentoFrameworkInterception{closure}(&MagentoFrameworkAppRequestHttp#0000000004386143000000003ce7d63e#) called at [vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php:99]
#25 MagentoStoreAppFrontControllerPluginRequestPreprocessor->aroundDispatch(&MagentoFrameworkAppFrontControllerInterceptor#0000000004386036000000003ce7d63e#, &Closure#0000000004386055000000003ce7d63e#, &MagentoFrameworkAppRequestHttp#0000000004386143000000003ce7d63e#) called at [vendor/magento/framework/Interception/Interceptor.php:135]
#26 MagentoFrameworkAppFrontControllerInterceptor->MagentoFrameworkInterception{closure}(&MagentoFrameworkAppRequestHttp#0000000004386143000000003ce7d63e#) called at [vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php:69]
#27 MagentoPageCacheModelAppFrontControllerBuiltinPlugin->aroundDispatch(&MagentoFrameworkAppFrontControllerInterceptor#0000000004386036000000003ce7d63e#, &Closure#0000000004386055000000003ce7d63e#, &MagentoFrameworkAppRequestHttp#0000000004386143000000003ce7d63e#) called at [vendor/magento/framework/Interception/Interceptor.php:135]
#28 MagentoFrameworkAppFrontControllerInterceptor->MagentoFrameworkInterception{closure}(&MagentoFrameworkAppRequestHttp#0000000004386143000000003ce7d63e#) called at [vendor/magento/framework/Interception/Interceptor.php:153]
#29 MagentoFrameworkAppFrontControllerInterceptor->___callPlugins('dispatch', array(&MagentoFrameworkAppRequestHttp#0000000004386143000000003ce7d63e#), NULL) called at [generated/code/Magento/Framework/App/FrontController/Interceptor.php:26]
#30 MagentoFrameworkAppFrontControllerInterceptor->dispatch(&MagentoFrameworkAppRequestHttp#0000000004386143000000003ce7d63e#) called at [vendor/magento/framework/App/Http.php:116]
#31 MagentoFrameworkAppHttp->launch() called at [vendor/magento/framework/App/Bootstrap.php:261]
#32 MagentoFrameworkAppBootstrap->run(&MagentoFrameworkAppHttpInterceptor#00000000043861a7000000003ce7d63e#) called at [index.php:39]

Here is my Default XML

<?xml version="1.0"?>
<page layout="3columns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <update handle="default_head_blocks"/>
<body>
<!-- <referenceContainer name="after.body.start">
<block class="MagentoFrameworkViewElementTemplate" name="custom.js" template="Magento_Theme::abcustom_js.phtml"/>
</referenceContainer> -->
<referenceBlock name="navigation.sections" remove="true" />
<referenceBlock name="catalog.compare.sidebar" remove="true" />
<referenceBlock name="register-link" remove="true" />  
<referenceBlock name="wish-list-link" remove="true" />
<referenceBlock name="wishlist_sidebar" remove="true" />
<referenceBlock name="my-account-link" remove="true"/>
<referenceBlock name="authorization-link" remove="true" />
<referenceBlock name="footer_links" remove="true"/>
<referenceBlock name="report.bugs" remove="true" />
<referenceBlock name="top.links" remove="true" />
<referenceBlock name="advanced-search-link" remove="true" />
<referenceBlock name="catalog.compare.link" remove="true" />     
<referenceBlock name="catalog.compare.sidebar" remove="true"/>
<referenceBlock name="wishlist_sidebar" remove="true"/>
<referenceBlock name="header.panel.wrapper" remove="true" />
<referenceBlock name="minicart" remove="true"/>      
<referenceContainer name="page.bottom.container">
</referenceContainer>
<referenceContainer name="header-wrapper">
<container name="customheader.container" as="someContainer" label="Some Container" htmlTag="div" htmlClass="custom-search-products-menu" ></container>
</referenceContainer>
<referenceContainer name="content">
<block class="MagentoCmsBlockBlock" name="home-page-newsletter">
<arguments>
<argument name="block_id" xsi:type="string">home-page-newsletter</argument>
</arguments>
</block>
<block class="MagentoCmsBlockBlock" name="header-store-language">
<arguments>
<argument name="block_id" xsi:type="string">header-store-language</argument>
</arguments>
</block>
<block class="MagentoCmsBlockBlock" name="all-product-header-menu">
<arguments>
<argument name="block_id" xsi:type="string">all-product-header-menu</argument>
</arguments>
</block>
<block class="MagentoCmsBlockBlock" name="home-page-cms-menu">
<arguments>
<argument name="block_id" xsi:type="string">home-page-cms-menu</argument>
</arguments>
</block>
<block class="MagentoCmsBlockBlock" name="header-call-login-button">
<arguments>
<argument name="block_id" xsi:type="string">header-call-login-button</argument>
</arguments>
</block>
</referenceContainer>
<referenceContainer name="footer">
<block class="MagentoCmsBlockBlock" name="footer-link">
<arguments>
<argument name="block_id" xsi:type="string">footer-links</argument>
</arguments>
</block>
</referenceContainer>
<block class="MagentoCmsBlockBlock" name="footer-content-images">
<arguments>
<argument name="block_id" xsi:type="string">footer-content-images</argument>
</arguments>
</block>
<move element="footer-content-images" destination="page.wrapper" after="footer" />
<move element="home-page-newsletter" destination="main.content" after="-" />
<move element="customheader.container" destination="header-wrapper" after="navigation.sections" />
<move element="header-call-login-button" destination="customheader.container" before="home-page-cms-menu"/>
<move element="home-page-cms-menu" destination="customheader.container" after="header-call-login-button" />
<move element="all-product-header-menu" destination="customheader.container" before="home-page-cms-menu"/>
<move element="header-store-language" destination="customheader.container" before="-"/>
<referenceContainer name="before.body.end">
             <block class="MagentoFrameworkViewElementTemplate" name="test" template="Magento_Theme::custom-script.phtml"></block>

            </referenceContainer>
<!-- <referenceBlock name="breadcrumbs" remove="true" /> -->
</body>
</page>

My Default_Heads_Blocks file

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<css src="css/font-awesome.min.css"/>
<css src="css/fa-solid.css"/>
<css src="css/fa-regular.css"/>
<css src="css/fa-brands.css"/>
<css src="Magento_Theme::css/aos.css"/>
<css src="bootstrap/css/bootstrap.css" />
<css src="fontawesome-pro/css/fontawesome.min.css" />
<css src="fontawesome-pro/css/all.min.css" />
<css src="bootstrap/css/bootstrap-theme.css" />
<!-- <script src="requirejs/require.js"/> -->
<!-- <script src="bootstrap/js/bootstrap.min.js" media="all and (min-width: 1px)"/> -->
<!--  <script src="https://unpkg.com/[email protected]/dist/aos.js" src_type="url" /> -->
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.inview/1.0.0/jquery.inview.min.js" src_type="url"></script> -->
<!-- <script src="js/sticky-sidebar.js" />
<script src="js/jquery.sticky-sidebar.js" /> -->
<!-- <script src="bootstrap/js/jquery-3.6.0.min.js" />
<script src="bootstrap/js/jquery.inview.min.js" />
<script src="bootstrap/js/gsap.min.js" /> -->
<!-- <script src="bootstrap/js/wow1.js" />
<script src="bootstrap/js/wow.min.js" />
<css src="bootstrap/css/animate.css" /> -->
<css src="css/custom-c.css"/> 
<css src="css/custom-v.css"/>
<css src="css/custom-h.css"/>
<!-- <script src="Magento_Theme::js/aos.js"/>
 --></head>   
</page>