Item2365: afterAttachmentSaveHandler called too early
Priority: Normal
Current State: Closed
Released In: 1.1.0
Target Release: minor
Applies To: Engine
Component:
Branches:
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