fixing bug #5200 by verifying if the publication still exists when an attachment is removed
Bug #5200 - adjusting the fix by sending notifications only if the publication exists and is not in basket
Merge branch 'bug-5200' into components-5.14.x