13

Please correct the XML data and try again. Element 'referenceBlock': This element is not expected. Expected is one of ( referenceContainer, container, update, move ). Line: 1

I got this error while trying to remove page title through Design -> Layout Update XML

This the code I used to remove block:

<referenceBlock name="page.main.title" remove="true"/>

referenceContainer works fine but problem only with referenceBlock

0

2 Answers 2

21

I got the solution, used referenceBlock inside the referenceContainer works fine, may be anyone help.

<referenceContainer name="page.wrapper">
        <referenceBlock name="page.main.title" remove="true"/>
</referenceContainer>
0

I had the same error and what I would have done to solve it was the answer by the previous post accepted answer:)

So what I could add this is that this error highly likely has to do with a magento migration for ones who are interested...

Please correct the XML data and try again. Element 'reference': This element is not expected. Expected is one of ( referenceContainer, container, update, move, head, body ). Line: 1

CONTENT->PAGES-> PAGES (ELements) once you opend your page its a wrong coding in the field under the DESIGN -> LAYOUT UPDATE XML .

So when facing this on the new Magento 2.2.6 version ...

I removed it and saved the page and error disapeared and page was saved sinds the setting was coding for style upfate of old template for magento 1.9x that wasn't needed anymore anyway

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.