All Magento products were working properly last week. Now I check that all product pages through exceptions.

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

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

Please have a look, it's urgent Any help is really appreciated

  • there is something wrong in your catalog product XML file. Can you tell me your magento version Oct 12, 2020 at 13:09
  • my Magento version is 2.3 Oct 12, 2020 at 13:25

1 Answer 1


Got it, please remove after attribute from referenceBlock. You can not use after and before attribute in referenceContainer tag.

If you want to use after or before. you can use this on move tag like below.

 <move element="element name" destination="where you want to move" after="">
  • Where I can find this file Oct 12, 2020 at 13:23
  • please check your current theme. app/design/frontend/[Vendor][Yourtheme]/Magento_Catalog/layout/catalog_product_view.xml Oct 12, 2020 at 13:48
  • or if you have installed any third-party module which is related to the product details page. Then look into the XML file of 3rd party extension. Oct 12, 2020 at 13:49
  • This is not working for me even after disable all the modules Oct 12, 2020 at 15:07

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.