Hi All,
Am running on AEM 6.1 SP2-CFP11.
We had a scenario:
The author has de-activated (by mistake) and activated the parent node of the content page which has 200+ child pages.
The problem is we need to identify what are all the pages which got activated newly during this bulk activation and deactivate them again.
Can someone please help me with the better solution to address this scenario? We don't have the error logs/replication logs since this happened a month ago.
Note: We have a workflow created which activates/deactivates the bunch of child nodes when a parent node is activated/de-activated.
Thanks,
By default the replication creates a new version of a page.
* For each of these pages:
** Identify the version which has been created by this replication action
** Check the replicationStatus property on that version
** if (replicationStatus == DEACTIVATED):
*** The page was deactivated when this mistake happened
** if (replicationStatus not present):
*** The page has never been activated
** (if (replicationStatus == ACTIVATED):
*** The page was activated at that time
You should probably validate this approach in some test environment :-)
Good luck!
Jörg
Hi Jörg, Thanks much for spending your time to answer my problem.
Am trying to implement your solution, can you please help me with a sql2 query or a query builder params, which gets me the replication status of a page? - Am struggling here.
Thanks,
Arun.
You can use something just like this ( below one only for pages which are activated )
path=/content/project
type=cq:Page
group.p.or=true
group.1_property=jcr:content/cq:lastReplicationAction
group.1_property.value=Deactivate
group.2_property=jcr:content/cq:lastReplicationAction
group.2_property.operation=not
You need to check that property on the versioned nodes (which live under /jcr:system), not on the current pages in /content. Therefor a simple query does not help. You need to traverse the version history of each of the nodes which was affected.
And before you start to implement code, you should validate the algorithm manually.
Jörg
SELECT * FROM [nt:base] AS s WHERE ISDESCENDANTNODE([/content/we-retail]) and s.[cq:lastReplicated] >= '2018-03-20T14:37:27.530+05:30'
you can also add another and clause to find between two dates
Views
Likes
Replies
Views
Likes
Replies