Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Raising a “warning” status during SDL Tridion 2011 publishing

We would like to implement some functionality so that when for some reason an error occurs during publishing or resolving, and we skip over it using a try/catch block, but would still like to notify the user that something was skipped.

The SDL Tridion 2011 Publishing Queue can filter by status. One of these statuses is “Warning”. Is it possible to trigger a publish transaction to have a “Warning” status using the API in either template code or a custom resolver?

like image 634
Chris Summers Avatar asked Dec 31 '25 22:12

Chris Summers


2 Answers

If all you need is a warning during the publishing (such that the Publish Transaction has status warning), then you will need to set PublishInstruction.MaximumNumberOfRenderFailures to something greater than 0. As long as the number of Render errors is lower than the max you specified, the status of the Publish will be Warning.

If an error occurs outside rendering, then the instruction will show as Failed.

On the other hand, if you want to show a message in the GUI (in the MessageCenter) with the 'Warning' that something went wrong, then you will need a more complex architecture. Frank worked on this a while back. The idea (IIRC) is to have a GUI piece, e.g. an iframe polling a service that returns statuses for that user's Publish actions. An event system would produce these statuses by monitoring the PublishInstruction, and it would write them into some kind of storage (file, db, memory) that the service would then poll.

like image 197
Mihai Cădariu Avatar answered Jan 03 '26 04:01

Mihai Cădariu


I'm afraid this isn't possible, but the answers above might help you find an alternative solution to this.

like image 35
johnwinter Avatar answered Jan 03 '26 03:01

johnwinter



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!