0

I was working with Magento 2.2.5 using XAMPP server on windows. I uploaded files to debian and imported my database also I maked changes in core_config_data and now I have this errors :

1 exception(s): Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'script': The attribute 'src' is required but missing. Line: 35

Element 'script': Character content is not allowed, because the content type is empty. Line: 35


Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'script': The attribute 'src' is required but missing. Line: 35

Element 'script': Character content is not allowed, because the content type is empty. Line: 35

#0 /var/www/html/magento/vendor/magento/framework/Config/Dom.php(115): Magento\Framework\Config\Dom->_initDom('<layout xmlns:x...')
#1 /var/www/html/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, '/var/www/html/m...', '%message%\nLine:...')
#2 /var/www/html/magento/vendor/magento/framework/ObjectManager/Factory/Compiled.php(108): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\\Framewo...', Array)
#3 /var/www/html/magento/vendor/magento/framework/ObjectManager/ObjectManager.php(56): Magento\Framework\ObjectManager\Factory\Compiled->create('Magento\\Framewo...', Array)
#4 /var/www/html/magento/vendor/magento/framework/Config/DomFactory.php(42): Magento\Framework\ObjectManager\ObjectManager->create('Magento\\Framewo...', Array)
#5 /var/www/html/magento/vendor/magento/framework/View/Model/Layout/Update/Validator.php(141): Magento\Framework\Config\DomFactory->createDom(Array)
#6 /var/www/html/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 /var/www/html/magento/vendor/magento/framework/View/Model/Layout/Merge.php(442): Magento\Framework\View\Model\Layout\Merge->_validateMergedLayout('LAYOUT_frontend...', '<body>\n   <refe...')
#8 /var/www/html/magento/vendor/magento/framework/View/Layout/Builder.php(86): Magento\Framework\View\Model\Layout\Merge->load()
#9 /var/www/html/magento/vendor/magento/framework/View/Layout/Builder.php(63): Magento\Framework\View\Layout\Builder->loadLayoutUpdates()
#10 /var/www/html/magento/vendor/magento/framework/View/Layout.php(254): Magento\Framework\View\Layout\Builder->build()
#11 /var/www/html/magento/vendor/magento/framework/View/Layout.php(876): Magento\Framework\View\Layout->build()
#12 /var/www/html/magento/vendor/magento/module-cms/Helper/Page.php(171): Magento\Framework\View\Layout->getBlock('page_content_he...')
#13 /var/www/html/magento/vendor/magento/module-cms/Controller/Index/Index.php(43): Magento\Cms\Helper\Page->prepareResultPage(Object(Magento\Cms\Controller\Index\Index\Interceptor), 'home')
#14 /var/www/html/magento/vendor/magento/framework/App/Action/Action.php(107): Magento\Cms\Controller\Index\Index->execute()
#15 /var/www/html/magento/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#16 /var/www/html/magento/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Cms\Controller\Index\Index\Interceptor->___callParent('dispatch', Array)
#17 /var/www/html/magento/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Cms\Controller\Index\Index\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#18 /var/www/html/magento/generated/code/Magento/Cms/Controller/Index/Index/Interceptor.php(26): Magento\Cms\Controller\Index\Index\Interceptor->___callPlugins('dispatch', Array, Array)
#19 /var/www/html/magento/vendor/magento/framework/App/FrontController.php(55): Magento\Cms\Controller\Index\Index\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#20 /var/www/html/magento/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#21 /var/www/html/magento/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#22 /var/www/html/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))
#23 /var/www/html/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))
#24 /var/www/html/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))
#25 /var/www/html/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))
#26 /var/www/html/magento/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#27 /var/www/html/magento/generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, NULL)
#28 /var/www/html/magento/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#29 /var/www/html/magento/vendor/magento/framework/App/Bootstrap.php(256): Magento\Framework\App\Http->launch()
#30 /var/www/html/magento/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#31 {main}

Thanks for help.

  • Did you removed var folder ? – Pawan Sep 9 '18 at 9:20
  • No i didn't remove it – Aissa Mahdi Sep 9 '18 at 9:44
0

Error statement seems that in your code you have used script tag in any of xml file it's not contain src attribute

Please check all custom module files layout files.

If there are many custom module, disable module one by one you will get exact module in which you can find file easily. use below code to disable module

php bin/magento module:disable VendorName_ModuleName

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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