Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Custom preprocessor exception message not shown in the page

Avatar

Avatar
Validate 1
Level 2
prabudossh
Level 2

Likes

4 likes

Total Posts

26 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 3
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 2
prabudossh
Level 2

Likes

4 likes

Total Posts

26 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 3
Boost 1
Affirm 1
View profile
prabudossh
Level 2

03-01-2020

Hi, 

We have written a custom preprocessor that gets invoked on page publish to identify if a particular component is present on the page and invoke a workflow for approval before page activation. This all works fine but the custom 'ReplicationException' is not showing up in the page. It shows up in the sites/siteadmin section when i click on "quick publish" button, but the exception is not showing up in the actual page when i click on "Publish Page". In the actual page, it only says "ERROR: Failed to publish the selected page(s)"

 

I am on AEM 6.4.6.0, any idea why this behavior?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
Level 3
Dipti_Chauhan
Level 3

Likes

13 likes

Total Posts

32 posts

Correct Reply

9 solutions
Top badges earned
Validate 1
Give Back 5
Give Back 3
Give Back
Boost 5
View profile

Avatar
Validate 1
Level 3
Dipti_Chauhan
Level 3

Likes

13 likes

Total Posts

32 posts

Correct Reply

9 solutions
Top badges earned
Validate 1
Give Back 5
Give Back 3
Give Back
Boost 5
View profile
Dipti_Chauhan
Level 3

05-01-2020

Hi,

When you throw error message from processor e.g

 

throw new ReplicationException("your custom message");  This message only gets priority when you publish page from siteadmin.

 

If you want to show different error message when you publish from page then you need to overlay : http://localhost:4502/libs/cq/gui/components/authoring/editors/clientlibs/core.js    <Check quick publish option>.

 

Thanks

Dipti

 

 

Answers (2)

Answers (2)

Avatar

Avatar
Validate 1
Level 2
prabudossh
Level 2

Likes

4 likes

Total Posts

26 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 3
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 2
prabudossh
Level 2

Likes

4 likes

Total Posts

26 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 3
Boost 1
Affirm 1
View profile
prabudossh
Level 2

04-01-2020

I am not sure if this is documented anywhere but i was looking into this file /libs/cq/gui/components/common/wcm/clientlibs/wcm/js/publish.js that has the necessary logic in fail/error condition. This is very similar change to quickpublish.js or managepublication.js that were being discussed in the other thread. I tried to overlay it but still no luck

Avatar

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,089 likes

Total Posts

3,123 posts

Correct Reply

1,063 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,089 likes

Total Posts

3,123 posts

Correct Reply

1,063 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile
Jörg_Hoh
Employee

04-01-2020

Is it documented that the exception message is displayed in the error message to the authors?