Disable or Override OOTB Replication PreProcessor

Avatar

Avatar
Give Back
Level 2
Kundan_Ray1
Level 2

Likes

3 likes

Total Posts

13 posts

Correct reply

0 solutions
Top badges earned
Give Back
Ignite 1
Validate 1
Shape 1
Boost 3
View profile

Avatar
Give Back
Level 2
Kundan_Ray1
Level 2

Likes

3 likes

Total Posts

13 posts

Correct reply

0 solutions
Top badges earned
Give Back
Ignite 1
Validate 1
Shape 1
Boost 3
View profile
Kundan_Ray1
Level 2

31-08-2020

We have a requirement where we need to replicate a locked page .

 

OOTB - com.day.cq.replication.impl.ReplicatorImpl  is failing as  pre processor defined in VersionManagerImpl  is called before replication and fails the replication api

 

if (page.isLocked()) {
throw new ReplicationException("Locked pages cannot be replicated. The owner needs to unlock the page first. Cannot perform replication");
}

 

For now, we have disabled component com.day.cq.wcm.core.impl.VersionManagerImpl and we do not have version purge requirement (suppressversion - true ).

 

Is there a way to disable OOTB replication preprocessor only or override the replication preprocessor ?

Or any other solutions to replicate a locked page ?

 

 

 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 25
MVP
Singaiah_Chintalapudi
MVP

Likes

131 likes

Total Posts

234 posts

Correct reply

39 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Ignite 5
Ignite 3
View profile

Avatar
Validate 25
MVP
Singaiah_Chintalapudi
MVP

Likes

131 likes

Total Posts

234 posts

Correct reply

39 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Ignite 5
Ignite 3
View profile
Singaiah_Chintalapudi
MVP

31-08-2020

If you don't want to the lock capability just hide that feature for all authors so you don't have to deal with so much customization on the back-end. Hiding this feature would be better and authors would not confuse  why the page gets replicated even though the page was locked.

 

Depends on the AEM version, you may be able to hide this using jus the permissions or you'll have to overlay the OOTB JSP's to hide this lock button.

Answers (3)

Answers (3)

Avatar

Avatar
Springboard
MVP
Shashi_Mulugu
MVP

Likes

234 likes

Total Posts

295 posts

Correct reply

67 solutions
Top badges earned
Springboard
Bedrock
Validate 1
Applaud 100
Establish
View profile

Avatar
Springboard
MVP
Shashi_Mulugu
MVP

Likes

234 likes

Total Posts

295 posts

Correct reply

67 solutions
Top badges earned
Springboard
Bedrock
Validate 1
Applaud 100
Establish
View profile
Shashi_Mulugu
MVP

31-08-2020

@Kundan_Ray1 if I understood your case, you are using lock feature that if any author makes change to page and want to publish the change later and also restrict any other user not to make any other changes on same... 

 

This feature is OOTB supported by Publish later feature by way versioning... where when author makes it Scheduled Publish.. it will create a version of current state of page and publish that version at the scheduled time..

Avatar

Avatar
Give Back
Level 2
Kundan_Ray1
Level 2

Likes

3 likes

Total Posts

13 posts

Correct reply

0 solutions
Top badges earned
Give Back
Ignite 1
Validate 1
Shape 1
Boost 3
View profile

Avatar
Give Back
Level 2
Kundan_Ray1
Level 2

Likes

3 likes

Total Posts

13 posts

Correct reply

0 solutions
Top badges earned
Give Back
Ignite 1
Validate 1
Shape 1
Boost 3
View profile
Kundan_Ray1
Level 2

31-08-2020

@Shashi_Mulugu  

We have scheduled replication process where pages are locked (by serviceuser , author )  till the time of replication . Once successful then the pages are unlocked.

This is working fine in AEM 6.3.2

 

But after Upgrade to 6.5.5 this fails as we noticed new code introduced in replication preprocessor

if (page.isLocked()) {
throw new ReplicationException("Locked pages cannot be replicated. The owner needs to unlock the page first. Cannot perform replication");
}

 

which prevents any replication for locked pages.

 

 

 

Avatar

Avatar
Springboard
MVP
Shashi_Mulugu
MVP

Likes

234 likes

Total Posts

295 posts

Correct reply

67 solutions
Top badges earned
Springboard
Bedrock
Validate 1
Applaud 100
Establish
View profile

Avatar
Springboard
MVP
Shashi_Mulugu
MVP

Likes

234 likes

Total Posts

295 posts

Correct reply

67 solutions
Top badges earned
Springboard
Bedrock
Validate 1
Applaud 100
Establish
View profile
Shashi_Mulugu
MVP

31-08-2020

@Kundan_Ray1 Thank you for reaching the Adobe Experience League community. The first case, why do you want to replicate a Locked Page? It was there for a reason. Author's may do changes on the page, but before they finalize and make it ready to publish, they may lock the page. If you enable replicate the page even on Lock, will unintentional changes goto Live Site?

 

Please explain a bit more about your usecase so that, we can suggest you better for the initial problem.

 

Hopes this helps