Item5463: beforeAttachmentSave and afterAttachmentSave not triggered on attachment delete or move
Current State: Confirmed
Released In: n/a
Target Release: n/a
When writing a plugin, I noticed that the only time beforeAttachmentSaveHandler or afterAttachmentSaveHandler get triggered is when uploading a new attachment. On deleting or moving an attachment, neither of those get triggered, leaving no way for a plugin to capture that event.
1) You can probably use EmptyPlugin
to test this - enable the beforeAttachmentSaveHandler and afterAttachmentSaveHandler functions, and enable debugging.
2) Pick any topic, and upload an attachment.
3) Look in the debug logs, and notice that both handlers triggered.
4) Delete the same attachment from the topic.
5) Look in the debug logs again, neither handler triggered.
- 21 Mar 2008
this is really an enhancement request - I'm pretty certain that the handlers have never been triggered, so just adding them for attachments will probly kill many plugins.
instead, we should look at adding new handlers.
- 25 Jun 2008