blog
Troubleshooting Missing Data from Page in Sitecore
Order of Operations for Troubleshooting

When debugging any issue related to a page that is missing data from Sitecore, the your first step should be to make sure that your data is published. This includes the data templates (which must be published before their content items) and the content items. It is also worthy to note that, occasionally, publishes might not go through. This can be due to performing the wrong type of publish, or one of many other possible causes (too many to name/describe here). As such, part two of making sure that your content is published is to clear your Sitecore cache (this can be done by going to your.site.host.name/Sitecore/admin/cache.aspx<-- note that the .aspx extension is required, here). If the issue still occurs, part three in making sure that your content is published is to go into the Web database from the Sitecore Desktop, and navigate to your items and verify that they have the correct data. If they do, your issue is not publishing; otherwise, your new task is to assess the cause of your content’s failure to publish.

The above should always be done BEFORE attempting to debug the code. This will save you a lot of time, and many headaches. Note that parts 1-3 of checking to make sure that your data is published can be done in any order, but you should always clear your Sitecore cache (part 2) after a publish (part 1) that is performed while ensuring that your content has been published (yes, some publishes will clear the Sitecore cache, but it is always best to cover the base cases).When I think that I have already published, I tend to prefer to do check the Web database to see if it has all of the expected content (part 3) first, before attempting to publish, again, and before clearing my Sitecore cache. Additionally, if you are publishing on a dev site, have a local instance with connection strings pointing to said dev site, and the content does not appear on your local, it is likely that you only need to clear your local Sitecore cache for your local content tree to update (this is due to database locks and ACID – it is expected behavior).

Lastly, remember to use the right kind of publish for the right job. For example, when renaming an item is your only change you must be sure to “Republish” the item, as Republish is the only kind of publish that will process item renames if none of the item’s fields have changed. If you’re only publishing a select few items and you don’t know the right publish to use,then use Republish. If it is larger number and you are unsure of which publish to use, then use a Smart Publish and if the issue is not resolved try a Republish. I highly advise using Republish to publish items and subitems, only, as opposed to using Republish for a site publish; even on smaller sites, a full site Republish can take over five minutes. As such, Republish should be a lastresort for full site publishes. 

0 Comments
Post a Comment