Details
-
Bug
-
Resolution: Fixed
-
Critical
-
5.0-milestone-1
-
Unknown
-
N/A
-
N/A
-
Description
vmassol
hmm strange it's as if we don't have an event sent when we remove an attachment
I don't get a wartchlist email when I remove an attachment
while I do get an email when i add one
is this know?
*known
5:42
tmortagne
vmassol: that would mean we don't modify the XWikiDocument when we remove an attachment5:42
vmassol
(it could also be that the watchlist doesn't handle attachment deletion)
tmortagne: indeed that's possible, haven't checked code5:43
tmortagne
what's in the watchlist is what's in messagestream AFAIK5:43
vmassol
indeed jus t checked
and deleteAttachment in XWikiDocument
doesn't change the doc
just accees the attachment store
and deleteXWikiAttachment in the attachmentstore doesn't send events5:44
tmortagne
yep like all stores
all attachment events are produced based on document events right now AFAIK
like object events5:45
vmassol
wait5:45
cjd
shouldn't it trigger a document save event since it causes the document to be resaved?5:45
vmassol
parentUpdate is true I think
and that should do a : context.getWiki().getStore().saveXWikiDoc(attachment.getDoc(), context, false);5:46
tmortagne
so no event5:46
vmassol
indeed no event5:46
tmortagne
since it does not go trough XWiki#saveDocument5:46
vmassol
right
I'll create a jira issue
we do have an AttachmentDeletedEvent class though
checking where it's used
5:47
tmortagne
vmassol: (05:45:05 PM) tmortagne: all attachment events are produced based on document events right now AFAIK5:48
tmortagne
AttachmentEventGeneratorListener5:48
vmassol
yep just seen the code
it's used in few places: activtiystreamimpl, lucene
5:48
just to listen to it
Attachments
Issue Links
- is duplicated by
-
XWIKI-1982 Attachments should be removed from the document in the document class, not in storage
- Closed
- is related to
-
XWIKI-1982 Attachments should be removed from the document in the document class, not in storage
- Closed