Details
-
Bug
-
Resolution: Cannot Reproduce
-
Major
-
None
-
4.2-milestone-3
-
Unknown
-
N/A
-
N/A
-
Description
To reproduce the issue:
- Set "display hidden documents" to yes in your profile
- Import xwiki-enterprise-ui-all.xar without excluding any document
- Go to the wiki home, the AS is empty
AFACT it's because of ActivityStreamImpl#getRelatedEvents() and the way it's used in the Activity macro.
Since all the documents are updated during the same request they have the same request ID, all the events from the request are returned by getRelatedEvents(). The overwriting of XWikiPreferences triggers a deleteAttachment event (the XAR), then there's this code in the Activity macro:
#macro(checkRelatedEvents) ## load related events #set ($relatedEvents = $xwiki.activitystream.getRelatedEvents($event)) #if ($relatedEvents.size() > 1) #if ($event.type == 'update') #foreach ($relatedEvent in $relatedEvents) #if ($relatedEvent.type != 'update') <-------- #set ($isUpdateRelatedEvent = true) #break #end #end #end
This will always match because the related events list contains an event of type deleteAttachment.
$isUpdateRelatedEvent will always be set to true and none of the event from the import will made it to the AS.
Attachments
Issue Links
- is related to
-
XE-1000 Making changes to several documents in the same request only makes one document appear in the rendering of the Activity macro
- Closed