app\design\frontend\Vendor\theme\Magento_Theme\templates\messages.phtml
<div data-bind="scope: 'messages'">
<div data-bind="foreach: { data: cookieMessages, as: 'message' }" class="messages">
<div data-bind="attr: {
class: 'message-' + message.type + ' ' + message.type + ' message',
'data-ui-id': 'message-' + message.type
}">
<div data-bind="html: message.text"></div>
</div>
</div>
<div data-bind="foreach: { data: messages().messages, as: 'message' }" class="messages">
<div data-bind="attr: {
class: 'message-' + message.type + ' ' + message.type + ' message',
'data-ui-id': 'message-' + message.type
}">
<div data-bind="html: message.text"></div>
</div>
</div>
</div>
<script type="text/x-magento-init">
{
"*": {
"Magento_Ui/js/core/app": {
"components": {
"messages": {
"component": "Magento_Theme/js/view/messages"
}
}
}
}
}
</script>
app\code\Vendor\Module\view\frontend\layout\checkout_index_index.xml
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
<head>
<title>Multi Step Checkout</title>
</head>
<body>
<referenceContainer name="columns.top">
<referenceBlock name="messages">
<action method="setTemplate">
<argument xsi:type="string" name="template">Magento_Theme::messages.phtml</argument>
</action>
</referenceBlock>
</referenceContainer>
<container name="sidebar.additional" label="Sidebar Additional" htmlTag="div">
<referenceBlock name="wishlist_sidebar" remove="true"/>
<referenceBlock name="sale.reorder.sidebar" remove="true"/>
<referenceBlock name="catalog.compare.sidebar" remove="true" />
</container>
<referenceBlock name="content">
</referenceBlock>
</body>
</page>
In Controller Code
$errorMsg = "Something";
$this->_messageManager->addError(__($errorMsg));
$this->_redirect('checkout', ['_fragment' => 'cart']);
But Even after all It's not triggering Error Messages.