Hi!
I am trying to activate a path which is a sling:Folder, but this is activating children of this path also.
Is there any way to control and activate only the path which is sling:Folder.
Thanks in advance.
Thanks,
Praveen.
Solved! Go to Solution.
Views
Replies
Total Likes
I have raised a support ticket with Adobe and found that this behavior is intended.
when we replicate a sling:Folder/nt:unstructured path it replicates children also if the child is of type (JcrConstants.NT_HIERARCHYNODE).
take a look here - you can write custom code using the Replicator API that can do this use case: How to replicate contents of a folder
Views
Replies
Total Likes
Can you share your AEM version, the relevant piece of code, and and extract of the log indicating this behavior? Can you reproduce it locally?
Views
Replies
Total Likes
Thanks for reply, my concern is I do not want to replicate children of the folder but it automatically does it.
I am using AEM 6.3, and using Replicator API.
replicator.replicate(session, ReplicationActionType.ACTIVATE, path, replicationOptions);
I have one path at etc/commerce/folder, which is of type sling:Folder, in logs it is showing activation of only "etc/commerce/folder" but internally it is activating all children of this folder which are of nt:unstructured.
Please let me know for more details.
Views
Replies
Total Likes
Ok, so if you pass "/etc/commerce/folder" (of nodetype "sling:folder") to the replicator.replicate() API call, it also replicates "/etc/commerce/folder/childnode"?
How do you see that? Is the replication status of "/etc/commerce/folder/childnode" updated accordingly? Or if the "childnode" was not present on publish before the replication, it is after the replication? For the later case, can you enable DEBUG logging on publish (DEBUG on the class com.day.cq.replication.impl should generate lots of debug statements)?
Jörg
Views
Replies
Total Likes
Hi Jorg,
Yes it is replicating all children of a sling:folder node, I deleted the node in publish and replicated only the path which is of sling:folder and it is creating all the child nodes also in publish.
Replication agent logs showing that it is replicating only the sling:folder path but the size is big (which means inclusive of child nodes).
I have enabled debugging on "com.day.cq.replication.impl" and found the below messages, some config related to HierarchyReplicationContentFilter is allowing the child paths.
com.day.cq.replication.impl.HierarchyReplicationContentFilterFactory$HierarchyReplicationContentFilter checking level of root [/etc/commerce/products/company/affiliates] against node [/etc/commerce/products/company/affiliates/affiliate1]: 6/7 => accept: true
affiliates is sling:folder, which is allowing the children also, please help me in understanding this HierarchyReplicationContentFilter.
Views
Replies
Total Likes
I have found that it is not only for sling:folder, it happens for nt:unstrucutred also.
Basically when I activate any path, it replicates everything under it except folders.
Views
Replies
Total Likes
That's true. From what I understand the behaviour you observe is not intended...
Can you raise a support ticket and provide insight about your usecase and why the current behaviour is not what you want?
Jörg
Thanks Jorg, will raise a ticket with Adobe. I will keep you posted on the findings, please let me know if you get any other thoughts on the same.
Views
Replies
Total Likes
I have raised a support ticket with Adobe and found that this behavior is intended.
when we replicate a sling:Folder/nt:unstructured path it replicates children also if the child is of type (JcrConstants.NT_HIERARCHYNODE).
Views
Likes
Replies
Views
Like
Replies