From 771ce3f157e85de7e85b6414f5c9ca2e3205db1d Mon Sep 17 00:00:00 2001 From: AFI Date: Fri, 12 May 2017 19:20:44 +0300 Subject: [PATCH] Suppress publish:end event Add 'Sitecore.Social.Client.MessagePosting.Handlers.PublishEndHandler' to 'publish:end:remote' --- .../App_Config/Include/zzz/Sitecore.Support.27341.config | 3 +++ .../Publishing/Service/Events/PublishEndHandler.cs | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Sitecore.Support.27341/App_Config/Include/zzz/Sitecore.Support.27341.config b/src/Sitecore.Support.27341/App_Config/Include/zzz/Sitecore.Support.27341.config index 6809c78..810bb2e 100644 --- a/src/Sitecore.Support.27341/App_Config/Include/zzz/Sitecore.Support.27341.config +++ b/src/Sitecore.Support.27341/App_Config/Include/zzz/Sitecore.Support.27341.config @@ -4,6 +4,9 @@ + + + \ No newline at end of file diff --git a/src/Sitecore.Support.27341/Publishing/Service/Events/PublishEndHandler.cs b/src/Sitecore.Support.27341/Publishing/Service/Events/PublishEndHandler.cs index 184f902..318241a 100644 --- a/src/Sitecore.Support.27341/Publishing/Service/Events/PublishEndHandler.cs +++ b/src/Sitecore.Support.27341/Publishing/Service/Events/PublishEndHandler.cs @@ -50,8 +50,8 @@ public void TriggerPublishEnd(object sender, EventArgs args) { list.Add(publisher.Options); this._logger.Info("Raising : 'publish:end' for '" + metadata.TargetName + "'", null); - base._eventing.RaiseEvent("publish:end", new object[] { publisher }); - publisher.Options.TargetDatabase.RemoteEvents.Queue.QueueEvent(new PublishEndRemoteEvent(publisher), true, true); + //base._eventing.RaiseEvent("publish:end", new object[] { publisher }); Sitecore.Support.27341 + publisher.Options.TargetDatabase.RemoteEvents.Queue.QueueEvent(new PublishEndRemoteEvent(publisher), true, true); // Sitecore.Support.27341 } } bool failed = eventData.Status == PublishJobStatus.Complete;