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?
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?
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"/>
</referenceContainer>
The above layout update will make use of Magento's message default template to display the messages.