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?
Solved! Go to Solution.
Views
Replies
Total Likes
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:
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
You can try to define a custom logging writer and define the messages as per your requirement. Check [1] for more details.
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.
You would need to overlay the jsp that is handling the response for activation
Hi Santhi!
I already tried to search for something of the sorts, but i can't find the correct one.
Are you using classic or touch UI?
I'm using touch ui on AEM 6.5
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
Hi Santhi!
Thanks for the info. I will look into it and come back to you.
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:
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