2

I'm getting an exception after every publish from CM, but the publishing is happening correctly.

I'm using Sitecore 8.1, Solr Search, and a separate publishing instance.

enter image description here

  • 1
    Can you share the patched config section for publish:end event. Are there any custom subscribers? – phani Nov 1 '16 at 6:04
  • 5
    1) Check your Sitecore logs and see what publish-related errors you have. Edit your question to include these errors. 2) If you have any custom Sitecore configuration that may affect publishing, attach that configuration to the question as well. – Dmytro Shevchenko Nov 1 '16 at 7:36
  • 1
    Can you go to http://[YourSite]/Sitecore/Admin/ShowConfig.aspx and send us the publish:end section? – Chris Auer Nov 1 '16 at 13:34
3

There's a couple clues here that I think I can attempt to provide some troubleshooting steps in order to answer your question. Now, before getting too far along, because the error is occurring in the publish:end handler all active publishing tasks for the items have already finished which is why it appears the publish was successful.

A Few Clues

  • You mention you have a separate publishing instance, so going on the assumption you've configured the Scaling config.
  • The error details out publish:end event handler, which indicates that the issue is within that handler.
  • Running Sitecore 8.1 with Solr

Taking a look at publish:end Events

In a default configuration for Sitecore 8.1 Update 3, we have the following event handlers for publish:end:

<event name="publish:end">
  <handler type="Sitecore.Publishing.HtmlCacheClearer, Sitecore.Kernel" method="ClearCache">
    <sites hint="list">
      <site>website</site>
    </sites>
  </handler>
  <handler type="Sitecore.Publishing.RenderingParametersCacheClearer, Sitecore.Kernel" method="ClearCache" />
  <handler type="Sitecore.ContentSearch.Events.PublishingEventHandler, Sitecore.ContentSearch" method="OnFullPublishEndHandler" patch:source="Sitecore.ContentSearch.config" />
  <handler type="Sitecore.ContentSearch.Events.PublishingEventHandler, Sitecore.ContentSearch" method="OnPublishHandler" patch:source="Sitecore.ContentSearch.config" />
  <!-- ACTIVE TEST CACHE CLEARER This event handler clears data from the ActiveTest cache -->
  <handler type="Sitecore.ContentTesting.Events.ActiveTestCacheClearer, Sitecore.ContentTesting" method="Process" patch:source="Sitecore.ContentTesting.config" />
  <handler type="Sitecore.Social.Client.MessagePosting.Handlers.PublishEndHandler, Sitecore.Social.Client" method="ClearDbMesageCache" patch:source="Sitecore.Social.config" />
</event>

By looking at a default configuration, there are a few places where an error might occur. Again, this is the default configuration which means the error may be in any kind of custom code that you've created, if you have a custom publish:end handler. Going on the assumption you don't.

Things to Verify

  • The site(s) listed for the HtmlCacheClearer are accurate to your environment.
  • Is SOLR Running at the configured endpoint?

Other Potential Causes

  • Not with publish:end specifically, but I have seen weirdness out of ContentTesting. There is a ContentTesting event handler in the stock configuration. If you wanted to rule out, you could disable this handler in the Sitecore.ContentTesting.config file.
  • Are you using Glass? Glass Mapper for Sitecore has a publish:end event that clears the Glass Cache. If, for some reason, this cache was unavailable or missing, theoretically it might cause an error.

Need more info?

To troubleshoot this further, you'll want to provide the following information:

  • Excerpt of Sitecore Log and Publishing Log file during the publish event.
  • Copy of your publish:end events from /sitecore/admin/showconfig.aspx

Hope this helps!

  • Thanks for you trouble shooting steps, issue was with a custom handler added in the publish:end – Jojo Nov 3 '16 at 13:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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