Hi,
I'm facing the issue on launches promotion after launch date edit.
I created a launch with existing content, excluding subpages and inheriting the source page live data.
I set the Launch Date as "2018-09-01T12:00:00.000-04:00"
Then I edited the content of the launch page and mark it "isProductionReady" as true for promoting it. Added this property to the page using workflow after approval.
After this, I updated the launch date (liveDate) to "2018-09-02T12:00:00.000-04:00" (a day after).
I noticed that the launch was promoted on 2018-09-01 as well as 2018-09-02. The lastPromoted date property was also updated to 2018-09-01 and then 2018-09-02.
Now, I'm confused that after editing launch promoted on it's originally scheduled time as well as it's new launch time.
Could you please provide the background of this behavior and solution if possible?
** Please tell, if it's confusing, I'll provide more detail.
Views
Replies
Total Likes
Can you please provide the steps to reproduce this? and which AEM version is in consideration? Nothing has been reported like this as of now.
-kautuk
Views
Replies
Total Likes
Hi Kautuk,
Thanks for checking my question.
I'm using AEM 6.1 SP1
Steps to reproduce are:
After all these, I noticed that the launch was promoted at the T1 time as well as the T2 time. The "lastPromoted" date property was also updated to T1 and then T2.
Actually, I start an EventHandler on filter "(&(path=/content/launches/*/jcr:content)(resourceType=wcm/launches/components/launch))" and check for "lastPromoted" property added/changed to do further processing on the pages while puhing the actual page to publisher. But this is something which is after launch promotion. Not at all related to the issue I reported (just for info).
Please let me know your findings.
Views
Replies
Total Likes
Does anybody have a solution for it?
++ kautuksahni
Views
Replies
Total Likes
Apologies for the late response.
I would recommend opening a Support ticket for this.
-Kautuk
Views
Replies
Total Likes
So when you create a launch below is node structure for launches gets set. You should see all the launches under /content/launches/<yyyy>/<mm>/<dd>/<launchname> and you should be able to see the launch date in /content/launches/<yyyy>/<mm>/<dd>/<launchname>/jcr:content "livedata" property.
So when you edited there would be two launch name jobs, hence two promotion happened. To disable one of them you can safely move the launchname to tmp to disable them.
Views
Replies
Total Likes
Thanks for your input. Yes, I can see two Jobs creating "com/adobe/cq/wcm/launches/autopromote". But, this would be an issue from the AEM side because I'm editing the launch timing, not adding a new one.
Could you please also tell me the way to disable one of the Job (programmatically and manually)? I actually don't know how to move the launchname to tmp. Any reference would be great.
Thanks.
Views
Replies
Total Likes
Seems like this is an AEM bug, where on the edit of a launch date, a new Job creates to autopromote the launches.
The Job name is "com/adobe/cq/wcm/launches/autopromote"
As saurabhs16239964 suggested, we can disable old Job. But the new Job doesn't create immediately, it takes some time. Does anybody have an idea about it?
To disable Job:
Map<String,Object> properties = new Hashtable();
properties.put("launchPath", "/content/launches/yyyy/mm/dd/launch-name");
Collection<ScheduledJobInfo> jobs = jobManager.getScheduledJobs("com/adobe/cq/wcm/launches/autopromote", -1, properties);
for (ScheduledJobInfo sj : jobs) {
if (! liveDateOfLaunchPage.equals(sj.getNextScheduledExecution().toString())) {
sj.unschedule();
}
}
Views
Replies
Total Likes