We have added an event to publish:complete and it is working fine when we publish in Sitecore (manually). However, when we do the exact same publish in code the event is not fired.
The code:
var publishOptions = new PublishOptions(item.Database, publishDb, PublishMode.Smart, lang, DateTime.Now); var publisher = new Publisher(publishOptions); publisher.Options.RootItem = item; publisher.Options.Deep = true; publisher.Publish(); The publish works but the event is not fired. Caches are cleared and it seems that the publish:end is fired, but not the complete (and we need that one).
Why is the complete not fired?
Sitecore version: 8.2-upd2