This is very common scenario that the content is published successfully, we can see it on Web database but it is not reflecting on the live site. There could be multiple reasons behind this behavior. In our case the Cache was getting cleared after content publishing. When scanned the configuration files this is what we figured out.
In the
<handler type="Sitecore.Publishing.HtmlCacheClearer, Sitecore.Kernel" method="ClearCache" ... ></handler>
node (which is subscribed to the “publish:end” and “publish:end:remote”) we saw the sites were defined like the following, many with spaces before and after the dashes:
<site>Australia - English</site> <site>Brazil - Portuguese</site> <site>Canada-French</site> <site>Canada-English</site> <site>China - Chinese</site>...
However, where the sites are defined, it looks like the names do not have spaces in them:
<sites> ... <site name="Australia-English" inherits="website" rootPath="/sitecore/content/australia" startItem="/home" virtualFolder="/en_au" physicalFolder="/en_au" language="en" htmlCacheSize="50MB" patch:source="www.jci.Sites.config" /> <site name="Finland-Finnish" inherits="website" rootPath="/sitecore/content/finland" startItem="/home" virtualFolder="/fi_FI" physicalFolder="/fi_FI" language="fi" htmlCacheSize="50MB" patch:source="www.jci.Sites.config" /> <site name="Austria-German" inherits="website" rootPath="/sitecore/content/austria" startItem="/home" virtualFolder="/de_at" physicalFolder="/de_at" language="de" htmlCacheSize="50MB" patch:source="www.jci.Sites.config" /> <site name="Ireland-English" inherits="website" rootPath="/sitecore/content/ireland" startItem="/home" virtualFolder="/en_ie" physicalFolder="/en_ie" language="en" htmlCacheSize="50MB" patch:source="www.jci.Sites.config" /> <site name="Brazil-Portuguese" inherits="website" rootPath="/sitecore/content/brazil" startItem="/home" virtualFolder="/pt_br" physicalFolder="/pt_br" language="pt" htmlCacheSize="50MB" patch:source="www.jci.Sites.config" /> <site name="Canada-French" inherits="website" rootPath="/sitecore/content/canada" startItem="/home" virtualFolder="/fr_ca" physicalFolder="/fr_ca" language="fr" htmlCacheSize="50MB" patch:source="www.jci.Sites.config" />
Hence due to the mismatch in Site names the Cache was getting cleared after publishing as Publish:End and Publish:End:Remote events were not getting fired properly.
Removing the spaces from the site names in the “publish:end” and “publish:end:remote” event handlers fixed the issue.
Hope this helps!
Leave a Reply