Content Published but not visible on live site

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>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

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Website Powered by

Up ↑

%d bloggers like this: