Tried to install a store locator extension.
When go to the front end producing this error.
1 exception(s): Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'block': This element is not expected. Expected is one of ( title, css, link, meta, script, remove, attribute ). Line: 708
Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'block': This element is not expected. Expected is one of ( title, css, link, meta, script, remove, attribute ). Line: 708
0 D:\xampp\htdocs\tork\vendor\magento\framework\Config\Dom.php(115): Magento\Framework\Config\Dom->_initDom(' 1D:\xampp\htdocs\tork\vendor\magento\framework\ObjectManager\Factory\AbstractFactory.php(111): Magento\Framework\Config\Dom->__construct('
How can i fix this issue?. Magento version 2.2.2
1 Answer 1
most probably you have in one of your layout files a <block> tag inside the <head> tag.
The <head> tag does not support block child elements.
See the xsd validation schema for head section: https://github.com/magento/magento2/blob/2.2-develop/lib/internal/Magento/Framework/View/Layout/etc/head.xsd#L51 
If your next question is, "But I need to add a block to my head section. how do I do that?" then you can check this: Magento 2: Adding Arbitrary HTML to the <head> of Every Page?
- 
 1Oh yeah....or the other way around. Didn't think this could be :)Marius– Marius2018年03月26日 12:33:32 +00:00Commented Mar 26, 2018 at 12:33
 - 
 Element 'route': Missing child element(s). Expected is ( resources ). any help?Roshan Rakesh Yadav– Roshan Rakesh Yadav2020年09月24日 11:06:05 +00:00Commented Sep 24, 2020 at 11:06