So lately I've been working on a Custom Data Provider for Sitecore and it's really neat and works pretty well until I encountered this:
As you can see I'm receiving double language versions. Even though the GetItemVersions of my DataProvider looks like this:
/// <summary>
/// Used to retrieve version and language information of given item.
/// </summary>
public override VersionUriList GetItemVersions(ItemDefinition itemDefinition, CallContext context)
{
VersionUriList result = null;
if (itemDefinition.ID == RootItem.RootId)
{
// Our root only has 1 version in 1 language.
result = new VersionUriList { new VersionUri(LanguageManager.GetLanguage("en"), Version.First) };
}
else if (CanProcess(itemDefinition.ID))
{
// Snipped processing of own items
}
return result;
}
So this means that any item that I don't handle I return null
. Has anyone seen this behaviour before and knows exactly where to fix this?