Element 'referenceContainer', attribute 'after': The attribute 'after' is not allowed. - How to find the offending element?

magento.stackexchange https://magento.stackexchange.com/questions/238608

Domanda

After upgrading to Magento 2.2.5 I got the error

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

I understand that this is caused by an 'after' attribute in referenceContainer in an xml file.

But how can I find out, which xml file and which element is causing the error?

È stato utile?

Soluzione

I know you're probably looking for a log or command that will tell you exactly where this is occurring but as far as I'm aware that doesn't exist (if it does please let me know!).

The quickest way will be to search app/design/frontend/PACKAGE/THEME for after or referenceContainer and go through them . Even if you have 200 instances of this providing you have a half decent editor it should only take you a few seconds max per instance meaning it shouldn't take more than 10 minutes for the worst case.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a magento.stackexchange
scroll top