After display success/error message like "Item Added in cart" it won't remove from the page after refreshing the page. I am using Magento CE 2.0.7 version. Any one have the solution of this issue, please reply.
Also in login page error message won't display and after login success in next time login failure message will display on other page.
3 Answers 3
The issue has been addressed and fixed in the latest version of Magento 2.
If you have not found any solution yet, just upgrade the Magento. This will fix the problem.
I have tried it for Magento 2.1.6, which I upgraded to Magento 2.1.9.
-
I am on 2.4.2 EE and the bug is still present.Black– Black2021年03月18日 11:08:24 +00:00Commented Mar 18, 2021 at 11:08
at below repository people talking about cookie restriction mode issue for that
https://github.com/magento/magento2/issues/5301
You can idea about that what is cookie restriction mode and how can you enable or disable that in below link
http://docs.magento.com/m1/ce/user_guide/store-operations/cookie-restriction-mode.html
This is what I can help you for this problem
-
We already test all these, but not workingAshish Jagnani– Ashish Jagnani2016年09月11日 08:04:40 +00:00Commented Sep 11, 2016 at 8:04
there is a cookie record called "mage-messages". After deleting it, the old message won't be shown again.
I used the following code to remove it programmatically
...
private $_cookieManager;
...
public function __construct(
...
\Magento\Framework\Stdlib\CookieManagerInterface $cookieManager
) {
...
$this->_cookieManager = $cookieManager;
}
...
private function _deleteMessage() {
$this->_cookieManager->deleteCookie('mage-messages');
}
...
Hope it helps.
-
And when should I call this _deleteMessage(), so that it calls on every reload or when the user navigates to a different page?summu– summu2019年03月11日 14:30:54 +00:00Commented Mar 11, 2019 at 14:30