I have a custom servlet that captures a form submission and sets cq:lastModified, cq:lastModifiedBy and cq:distribute (to true). I ran a few tests and i'm noticing that not all of the submitted content is being reverse replicated back to the author. Out of 99 submissions, only 79 made it back to the author. I checked the publish instances (there are 2), one has 49 posts and one has 50 posts. Has anyone encountered this or have any help they could provide?
Solved! Go to Solution.
Views
Replies
Total Likes
this is the right way to do as all the UGC will be stored in 'outbox'
Views
Replies
Total Likes
I saw this post https://forums.adobe.com/thread/1111532 and moved my save to before the reverse replicating node values were set and then obviously added another after - this didn't really help. The next attempt i had 87 or 99 reverse replicated.
Views
Replies
Total Likes
Are you getting any log messages that provide clues about why not all content is being reserved replicated?
Views
Replies
Total Likes
Not that are helpful. I have an email service that triggers when a new submission comes in and i see that in certain cases these emails are being triggered but the *INFO* logs for creating an outbox item are not created, so to me that says that something is failing to trigger the reverse replication process. The code is below for the reverse replication.
//Page/Node creation here session.save(); pageContainer.setProperty("hideInNav", true); pageContainer.setProperty("cq:lastModified", Calendar.getInstance()); pageContainer.setProperty("cq:lastModifiedBy", session.getUserID()); pageContainer.setProperty("cq:distribute", true); session.save();
Views
Replies
Total Likes
I switched up my code to use the replication service instead. I found this example on Stackoverflow. Once implemented, all of my submissions were successfully reverse replicated. Is there any reason i shouldn't be using this method?
//pageContainer.setProperty("hideInNav", true); //pageContainer.setProperty("cq:lastModified", Calendar.getInstance()); //pageContainer.setProperty("cq:lastModifiedBy", session.getUserID()); //pageContainer.setProperty("cq:distribute", true); AgentIdFilter filter = new AgentIdFilter("outbox"); ReplicationOptions opts = new ReplicationOptions(); opts.setFilter(filter); replicator.replicate(session, ReplicationActionType.ACTIVATE, pageContainer.getPath(), opts);
Views
Replies
Total Likes
this is the right way to do as all the UGC will be stored in 'outbox'
Views
Replies
Total Likes
Views
Likes
Replies