Pre-Process ReplicationException Custom Error Message

Avatar

Avatar

mrpoofy

Avatar

mrpoofy

mrpoofy

24-09-2019

Hi i'm working with AEM 6.5 and i created a Pre-Process for the page activation.

When some parameter is not configured i'm throwing a Replication Exception with a message. The message appears correctly for the user but it adds a list with all the paths of content that was not published because of the error.

Is there any way i can customize that error message to remove or even filter the paths that can be shown in the error message? And where can i do it?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

mrpoofy

Avatar

mrpoofy

mrpoofy

24-09-2019

Hi again Santhi!

You are correct, i took a look at the files. And indeed it's there that we can control the error message. But like you said it's not recommended to change anything in there.

The error message is being populated from the com.day.cq.replication.impl.servlets.CommandServlet, with the response:

Santhi Swaroop

So the only way i can see to change the message, is changing the com.day.cq.replication.impl.servlets.CommandServlet or changing the Javascript classes for /libs/cq/gui/components/common/wcm/clientlibs/wcm/js/quickpublish.js and /libs/cq/gui/components/common/admin/managepublication/clientlibs/managepublication/js/managepublication.js

Answers (8)

Answers (8)

Avatar

Avatar

mrpoofy

Avatar

mrpoofy

mrpoofy

24-09-2019

Hi Santhi!

Thanks for the info. I will look into it and come back to you.

Avatar

Avatar

Santhi_Swaroop

Avatar

Santhi_Swaroop

Santhi_Swaroop

24-09-2019

Please take a look at /libs/cq/gui/components/common/wcm/clientlibs/wcm/js/quickpublish.js and /libs/cq/gui/components/common/admin/managepublication/clientlibs/managepublication/js/managepublication.js

I don’t know if this is a best practice to overlay above as you would need to keep track of these during upgrades of aem. Or try to have your own clientlib which can get the hook on client side and modify the message on UI with some query code.

Thanks

Avatar

Avatar

mrpoofy

Avatar

mrpoofy

mrpoofy

24-09-2019

I'm using touch ui on AEM 6.5

Avatar

Avatar

Santhi_Swaroop

Avatar

Santhi_Swaroop

Santhi_Swaroop

24-09-2019

Are you using classic or touch UI?

Avatar

Avatar

mrpoofy

Avatar

mrpoofy

mrpoofy

24-09-2019

Hi Santhi!

I already tried to search for something of the sorts, but i can't find the correct one.

Avatar

Avatar

Santhi_Swaroop_

Avatar

Santhi_Swaroop_

Santhi_Swaroop_

24-09-2019

You would need to overlay the jsp that is handling the response for activation

Avatar

Avatar

mrpoofy

Avatar

mrpoofy

mrpoofy

24-09-2019

Hi JaideepBrar​, i don't want to create a log with a custom message.

I want to change the message that is shown in a pop-up to the user when the ReplicationException is thrown.

Avatar

Avatar

jbrar

Employee

Avatar

jbrar

Employee

jbrar
Employee

24-09-2019

You can try to define a custom logging writer and define the messages as per your requirement. Check [1] for more details.

[1] https://helpx.adobe.com/experience-manager/6-3/sites/deploying/using/monitoring-and-maintaining.html...