Expand my Community achievements bar.

Nomination window for the Adobe Community Advisor Program, Class of 2025, is now open!
SOLVED

ReplicationActionType.DELETE does't work

Avatar

Level 1

There is a thread related to this discussion. But I don't think the question has been satisfactorily answered even though it's closed now. So I thought it'd be a good idea to open the discussion again.

ReplicationActionType.DELETE

I encountered the similar issue that ReplicationActionType.DELETE doesn't actually delete anything from author even though I was pretty sure that I used administrator user to delete the node and there wasn't error in the server log. So I wanted to know whether ReplicationActionType.DELETE was designed to delete a CQ node from author and publish (if the replication is setup properly).  BTW, I use AEM 6.

For the time being, if anyone seeing the same issue, there is a workaround to resolve the problem by using node.remove().

Thanks,

Zeyin

1 Accepted Solution

Avatar

Correct answer by
Level 3

Zeyin,

This happens to be a default behavior. As far as replication actions go, deactivate and delete are treated the same way. Both of these result in deactivating content on target server and do not delete content from the source system.

Please log a ticket with AEM support, if you think this is an issue and needs to be addressed.

Thanks

Varun

View solution in original post

3 Replies

Avatar

Correct answer by
Level 3

Zeyin,

This happens to be a default behavior. As far as replication actions go, deactivate and delete are treated the same way. Both of these result in deactivating content on target server and do not delete content from the source system.

Please log a ticket with AEM support, if you think this is an issue and needs to be addressed.

Thanks

Varun

Avatar

Level 1

Hey Varun,

Thanks for your response.

I don't think this is an issue if the document is clear. I'm not surprised many developers would spend hours trying to work out why their application didn't delete the nodes even though the document said it would.

So yes, I will log a support ticket to see whether I can get some official response/confirmation.

Thanks

Zeyin

Avatar

Level 5

In AEM, the ReplicationActionType.DELETE does not automatically delete nodes from the author instance. Instead, it is used for replication purposes, where it marks content for deletion during the replication process, and the deletion actually happens during the publish process (from author to publish environment).

To fix the issue:

  1. Check Replication Configurations: Ensure that replication is correctly configured between the author and publish instances. Replication should be triggered to remove the content from the publish environment.

  2. Use node.remove() in Author: As a workaround, explicitly use node.remove() in your code to delete the content locally in the author instance. After that, replicate the deletion to the publish instance.

  3. Confirm User Permissions: Make sure the user has proper permissions to delete content in the repository.

In summary, ReplicationActionType.DELETE marks content for deletion, and the actual deletion happens via replication to the publish instance. For immediate deletion, use node.remove() on the author instance.