We're trying to catch the event when a DCP publishing action was committed successfully.

In the subscribe we have the following line of code:

_eventSubscriptions.Add(EventSystem.Subscribe<ComponentTemplate, SetPublishStateEventArgs>(OnComponentTemplateSetPublishedToTransactionCommitted, EventPhases.TransactionCommitted));

However, we never get into OnComponentTemplateSetPublishedToTransactionCommitted, while other similar events (e.g. Page publish) work fine.

Any idea what to change?



1 Answer 1


Should you not be using Component instead of ComponentTemplate as your subject? To debug you could always set the subject as RepositoryLocalObject and see what happens when you publish a DCP

  • Hi Will, thanks for your feedback: Component did the trick for the DCP. But we now have a strange issue: SetPublishStateEvent events don't seem to be caught every time; looks like we only capture the events randomly. Rest of the events are always fired... Any idea? Mar 8, 2013 at 14:56
  • Since Will answered the original question, consider starting another question showing your code, Kristof. That'll help determine if it's a setup issue or code-related. Mar 8, 2013 at 18:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.