Cannot Delete Notifications or Messages from Admin Notifications Inbox

messages

If I go to SYSTEM > NOTIFICATIONS > INBOX and click the "REMOVE" link next to any of the active messages, the page refreshes and the message no longer appears in the listing indicating it has been successfully permanently "REMOVED".

The next day the message reappears as if it had never been removed. Is that normal behavior or should a massage PERMANENTLY be removed when clicking "remove"?

I also attempted to select all 248 messages in my admin inbox and remove them all. They appeared to be removed and the inbox showed that there were zero messages left in it (see image)

The next day all 248 messages will reappear in the inbox like they were never removed.

How can this problem be corrected so when I remove all of the messages in my inbox, they stay permanently removed and never reappear.

This happens every single time I try and delete any of the messages in the inbox.

Select all messages and remove all

All 248 messages successfully deleted, the next day they all reappear as though they were never deleted

It has been three days now and the messages remain deleted thanks to Jonathan's insight into the problem. It was in fact the cache maintenance script that I was running every night via cron. It would reset the red/deleted flag and the messages would all reappear as though they were never removed or read.

enter image description here

Best Answer

Messages aren't actually deleted from the database when removing them in admin. It works this way because when a new notification comes in the title of this notification is compared against the titles of existing notifications and if a notification with the same title already exists the notification is considered to already have been received and so is discarded.

Each notification has a 'read' and 'removed' flag and this is all that gets set when reading or removing in admin. This should however successfully stop the notifications from showing in admin again. An interesting point here however is that if the notifications are actually removed from the database (by clearing the adminnotification_inbox table) then Magento will consider none of the notifications to have been received before as there are no titles to compare to. The result is that all notifications are pulled in again - it sounds like you could have customisations to your store which actually remove the relevant database entries rather than just flagging them when you remove them from admin.

You can either:

  1. Disable the block output of the notifications module in admin if you don't want to see any notifications at all, including those from Magento (system -> configuration -> advanced -> disable modules output -> disable Mage_AdminNotification)
  2. Or use an extension such as our Spam Filter which will stop notifications from third party sources coming through but still allow notifications from Magento themselves (notifications won't even be written to the database, they are just thrown away).
Related Topic