We have Magento 2.4.3 in our local system. But error and success messages don't appear, it will appear on different Magento or on different pages. It is working on the server. Also tried changing the PHP version but didn't work.

Can anyone help?

  • Have you debug the private browser one's by clearing local cookie? Nov 11, 2021 at 13:07

1 Answer 1


Try adding below code in layout XML inside the <body> tag: app/design/frontend/[Vendor]/[Theme]/Magento_Theme/layout/default.xml

<referenceContainer name="page.messages">
        <block class="Magento\Framework\View\Element\Messages" name="messages" as="messages" template="Magento_Theme::messages.phtml"/>

The above layout update will make use of Magento's message default template to display the messages.

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.