Tag Archives: Sitecore

Sitecore custom cache that is cleared on publish

In this article I will demonstrate how to create a custom Sitecore cache and how to ensure that it is cleared when you publish. First I will create the simplest custom cache available: The cache is instantiated with a name, … Continue reading

Posted in c#, General .NET, Sitecore 6, Sitecore 7, Sitecore 8 | Tagged , , , , , , , | Leave a comment

Sitecore General error when submitting contact – Another contact with the same identifier already exists

In Sitecore when creating your own contacts you can get the following exception: 10604 10:16:27 ERROR General error when submitting contact. Exception: System.InvalidOperationException Message: Another contact with the same identifier already exists. Source: Sitecore.Analytics.MongoDB at Sitecore.Analytics.Data.DataAccess.MongoDb.MongoDbDataAdapterProvider.SaveContactWithIdentifier(IContact contact, ContactSaveOptions saveOptions) at … Continue reading

Posted in .net, c#, General .NET, Sitecore 8 | Tagged , , , , , | 1 Comment

Sitecore Scheduled Tasks – Run on certain server instance

If you would like certain Sitecore Scheduled Tasks run on a certain server instance (your CM server for example) the approach is pretty simple. First, create a new folder under /sitecore/system/Tasks. I have a new folder called “CMSchedules“. Place your Scheduled … Continue reading

Posted in Sitecore 5, Sitecore 6, Sitecore 7, Sitecore 8 | Tagged , | 3 Comments

Sitecore Publishing – Programmatically determine if item should be published

Sitecore uses it’s publish settings to determine if an item should be published. But you can only control a publish from versions and date times. So what if you have other values that determine if an item must be published … Continue reading

Posted in General .NET, Sitecore 6, Sitecore 7, Sitecore 8 | Tagged , , , | Leave a comment

Sitecore Event Queue – How to clean it – and why

Yesterday the dreaded Sitecore Event Queue almost killed me again – well it certainly almost killed my CM server. The server went from being busy but stable to being unresponsive. CPU and memory load skyrocketed: Obviously it happened after a … Continue reading

Posted in Sitecore 8 | Tagged , , , , | 2 Comments

Sitecore Measure Pipeline performance and profile processors

In Sitecore, Pipelines are by far my favorite dependency injection pattern, and I have used them since Sitecore 5. One of the secret features of pipelines are the built in profiling. Oh, yes, by flipping 2 switches you can measure the … Continue reading

Posted in Sitecore 7, Sitecore 8 | Tagged , , , | Leave a comment

Sitecore Advanced Configuration in .config files

Sitecore allows you to create configuration sections in /configuration/sitecore/ that consists of hierarchies of configurations including lists, and it will even help you serialize the configuration to object instances. Observe the following real life example of a configuration I created to … Continue reading

Posted in .net, c#, General .NET, Sitecore, Sitecore 5, Sitecore 6, Sitecore 7, Sitecore 8 | Tagged , , , , | Leave a comment

Sitecore PostSessionEndPipeline failed – MongoDB.Driver.MongoQueryException

In my (huge) Sitecore solution we experienced the following error: ERROR PostSessionEndPipeline failed. Exception: MongoDB.Driver.MongoQueryException Message: QueryFailure flag was Runner error: Overflow sort stage buffered data usage of 33570904 bytes exceeds internal limit of 33554432 bytes (response was { “$err” … Continue reading

Posted in Sitecore 8 | Tagged , , | Leave a comment

Sitecore get host name from a different context

Ohno, you are running in one context, say the “shell” context, and all of your URL’s have to point to the “website” context. The hustler will obviously hard-code the domain name of the “website” into the code. But the Sitecore … Continue reading

Posted in General .NET, Sitecore 6, c#, Sitecore 7, Sitecore 8 | Tagged , , , | Leave a comment

Sitecore EXM keeps reloading

Have you experienced that in Sitecore, the EXM Email Experience Manager window keeps reloading? In my solution, the problem was that I have a cookie with a “:” (colon) in the cookie name. According to the old RFC 2616 specification, … Continue reading

Posted in Sitecore 8 | Tagged , , , | Leave a comment