The Sitecore XML module appears to trigger rebuild based on when certain Sitecore events are fired off (publish:end
and publish:end:remote
). In order to ensure that those events are being correctly fired on CD instances, you can also create a similar handler:
using System;
using Sitecore.Diagnostics;
namespace MyProject.CMS.Custom.Events
{
public class EventHandler
{
public void LogEvent(object sender, EventArgs args)
{
Log.Info("***** Custom Event Fired *****", this);
}
}
}
And patch this into the events using a config patch file:
<?xml version="1.0"?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<events>
<event name="publish:end">
<handler patch:before="*[1]" type="MyProject.CMS.Custom.Events.EventHandler, MyProject.CMS.Custom" method="LogEvent"/>
</event>
<event name="publish:end:remote">
<handler patch:before="*[1]" type="MyProject.CMS.Custom.Events.EventHandler, MyProject.CMS.Custom" method="LogEvent"/>
</event>
</events>
</sitecore>
</configuration>
After deploying the code, check your logs on both the CM and the CD servers for the presence of the message. If the events are fired off correctly then the messages should be present.