Made a simple module. But in trying to view the url I get this error.

Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element >'referenceBlock', attribute 'after': The attribute 'after' is not allowed. Line: 827

Looks similar to other known issues but not exactly the same. Any Ideas?

  • can you please add your layout.xml file? Dec 12, 2017 at 21:08
  • <page xmlns:xsi="w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd" layout="1column"> <body> <referenceContainer name="content"> <block class="cbg\ReviewReminder\Block\helloworld" name="helloworld" template="helloworld.phtml" /> </referenceContainer> </body> </page>
    – Griehle
    Dec 12, 2017 at 21:55
  • You will notice that in this xml there is no after attribute. It must be in the core code somewhere. Just not sure where.
    – Griehle
    Dec 14, 2017 at 0:10

2 Answers 2


modify your XML file

<page xmlns:xsi="w3.org/2001/XMLSchema-instance"; xsi:noNamespaceSchemaLocation="../../../../../../../lib/inte‌​rnal/Magento/Framewo‌​rk/View/Layout/etc/p‌​age_configuration.xs‌​d" layout="1column"> 
        <referenceContainer name="content"> 
            <block class="Cbg\ReviewReminder\Block\Helloworld" name="helloworld" template="Cbg_ReviewReminder::helloworld.phtml" /> 
  • Exception #0 (Magento\Framework\Config\Dom\ValidationException): Theme layout update file 'C:/xampp/htdocs/mage22sd2/app/code/cbg/ReviewReminder/view/frontend/layout/rr_index_index.xml' is not valid. attributes construct error Line: 1 Couldn't find end of Start Tag page line 1 Line: 1 Extra content at the end of the document Line: 1
    – Griehle
    Dec 12, 2017 at 22:45

This issue has been addressed in the 2.2.2 release. It was a core Issue.

  • 1
    then how to resolve this issue ? Feb 14, 2018 at 13:14
  • upgrade to 2.2.2
    – Griehle
    Aug 29, 2022 at 22:37

Your Answer

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

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