There is 1 comment.
 
 
XWiki Platform / cid:jira-generated-image-avatar-dbb4da64-1c6c-4751-862c-e844dae33b90 XWIKI-23642 Open

When a document is deleted and the automatic redirect is enabled, DocumentCreatedEvent is received before DocumentDeletedEvent

 
View issue   ยท   Add comment
 

1 comment

 
cid:jira-generated-image-avatar-3572ac08-4bdc-4307-8522-c5c65bdb2d9a Thomas Mortagne on 29/Oct/25 11:56
 

The main reason is that the redirect document is created in a listener which receive the DocumenDeletedEvent causing a new DocumentCreatedEvent to be sent to all listener before the following DocumenDeletedEvent listeners are called.

The cleanest would be to move the redirect document creating in the job, after the delete, instead of a listener.