4

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.

asked Sep 11, 2016 at 7:04
0

3 Answers 3

1

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.

answered Oct 13, 2017 at 5:56
1
  • I am on 2.4.2 EE and the bug is still present. Commented Mar 18, 2021 at 11:08
0

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

answered Sep 11, 2016 at 7:24
1
  • We already test all these, but not working Commented Sep 11, 2016 at 8:04
0

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.

answered Mar 27, 2018 at 14:13
1
  • And when should I call this _deleteMessage(), so that it calls on every reload or when the user navigates to a different page? Commented Mar 11, 2019 at 14:30

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.