• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item5463: beforeAttachmentSave and afterAttachmentSave not triggered on attachment delete or move

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine   Enhancement Confirmed   n/a  

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

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.

-- TWiki:Main/MichelleHedstrom - 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.

-- SvenDowideit - 25 Jun 2008

ItemTemplate
Summary beforeAttachmentSave and afterAttachmentSave not triggered on attachment delete or move
ReportedBy TWiki:Main.MichelleHedstrom
Codebase 4.0.5
SVN Range TWiki-5.0.0, Sun, 09 Mar 2008, build 16496
AppliesTo Engine
Component

Priority Enhancement
CurrentState Confirmed
WaitingFor

Checkins

TargetRelease n/a
ReleasedIn

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2008-06-25 - SvenDowideit
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback