0

I get this after updating from 2.1 to 2.2

1 exception(s):
Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'block', attribute 'class': [facet 'pattern'] The value '\\Magento\Framework\View\Element\Template' is not accepted by the pattern '[A-Z][_a-zA-Z\d]*(\\[A-Z][_a-zA-Z\d]*)*'.
Line: 687

Element 'block', attribute 'class': '\\Magento\Framework\View\Element\Template' is not a valid value of the atomic type 'blockClassType'.
Line: 687


Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'block', attribute 'class': [facet 'pattern'] The value '\\Magento\Framework\View\Element\Template' is not accepted by the pattern '[A-Z][_a-zA-Z\d]*(\\[A-Z][_a-zA-Z\d]*)*'.
Line: 687

Element 'block', attribute 'class': '\\Magento\Framework\View\Element\Template' is not a valid value of the atomic type 'blockClassType'.
Line: 687

I already read topic on github with same problem but idk what I supposed to do to fix this.

Now I fixed broken class in one of files in app/code And get the "Attribute layout redefined" with checkout_index_index.xml I deleted this file and completely get this:

Element 'move', attribute 'name': The attribute 'name' is not allowed.
Line: 687

Element 'remove': This element is not expected. Expected is one of ( block, container, referenceBlock, referenceContainer, uiComponent ).
Line: 723

Also code of my chekout_index_index.xml because i delete, not fix it

<?xml version="1.0"?>
<page layout="empty" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="checkout" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="page.messages" remove="true" />
        <move element="logo" destination="checkout.header.wrapper" />
    </body>
</page>

1 Answer 1

1

To fix this issue remove "\" from start of class names

3
  • Okay I was looking for a broken class in theme files and it was in modules directory (app/code) Now I'm getting error "Attribute layout redefined" with checkout_index_index.xml When i delete this xml - I get errors with move remove classes: Element 'move', attribute 'name': The attribute 'name' is not allowed. Line: 687 Element 'remove': This element is not expected. Expected is one of ( block, container, referenceBlock, referenceContainer, uiComponent ). Line: 723
    – Wales
    Jan 31, 2018 at 18:06
  • Remove name attribute form move nodes
    – KAndy
    Jan 31, 2018 at 18:16
  • If i understand you right, I should change all constructions looks like this: <move element="navigation.sections" name="topmenu" as="catalog.topnav" destination="custom-menu" /> to <move element="navigation.sections" destination="custom-menu" /> ?
    – Wales
    Jan 31, 2018 at 18:31

Your Answer

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

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