You are here: Foswiki>Tasks Web>Item2365 (22 Mar 2010, WillNorris)Edit Attach

Item2365: afterAttachmentSaveHandler called too early

pencil
Priority: Normal
Current State: Closed
Released In: 1.1.0
Target Release: minor
Applies To: Engine
Component:
Branches:
Reported By: MichaelDaum
Waiting For:
Last Change By: WillNorris
Looking at Foswiki::Meta the afterAttachmentSaveHandler is called after the saveAttachment() has finished but before the topic meta object is committed to the store. From an outer perspective the save object thus hasn't arrived at the topic it is uploaded to, i.e. it does not appear as FILEATTACHMENT on the topic. Why is that so?

Basically, this renders it useless for fulltext engines like SolrPlugin that index topcis and attachemts where part of the properties of the topic - like tags and categories stored in formfields - are propagated to the attachments and part of the properties of attachments go back to the topic - like the attachment name.

CDot proposed on IRC to deprecate this handler and add a new one in the proper place, called afterUploadHandler.

-- MichaelDaum - 16 Nov 2009

Michael has been working on this; not sure why it's set for my feedback, so punting back to Michael.

-- CrawfordCurrie - 18 Nov 2009

It is set for feedback as there is a pending proposal to DeprecateAfterAttachmentSaveHandler.

-- MichaelDaum - 18 Nov 2009

See also Tasks.Item572 before finalizing the design.

-- TimotheLitt - 28 Dec 2009

Closing as DeprecateAfterAttachmentSaveHandler has been accepted and been implemented in Func API 2.1

-- MichaelDaum - 22 Mar 2010

ItemTemplate edit

Summary afterAttachmentSaveHandler called too early
ReportedBy MichaelDaum
Codebase
SVN Range Foswiki-1.0.7, Sun, 20 Sep 2009, build 5061
AppliesTo Engine
Component
Priority Normal
CurrentState Closed
WaitingFor
Checkins
TargetRelease minor
ReleasedIn 1.1.0
Topic revision: r8 - 22 Mar 2010, WillNorris
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy