Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Can't create media or block Folders (store error?)



I just upgraded 7.0 -> 7.6 (the latest dll's) and got my site up'n running. 

But I have a MAJOR issue with block and media folders, seems that I can't create a new one. If I try, then the REST call to will fail with exception: 

[ArgumentException: An item with the same key has already been added.]
System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) +14648971
System.Linq.Enumerable.ToDictionary(IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer) +267
EPiServer.Cms.Shell.Json.ContentDataStoreModelConverter.GetContentType(String typeIdentifier) +392
EPiServer.Cms.Shell.Json.ContentDataStoreModelConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer) +219
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue) +402
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) +790
Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) +792
EPiServer.Shell.Services.Rest.RestControllerActionInvoker.TryGetParameterValueFromRestProviders(ControllerContext controllerContext, ParameterDescriptor parameterDescriptor, Object& value) +284
EPiServer.Shell.Services.Rest.RestControllerActionInvoker.GetParameterValue(ControllerContext controllerContext, ParameterDescriptor parameterDescriptor) +44
System.Web.Mvc.ControllerActionInvoker.GetParameterValues(ControllerContext controllerContext, ActionDescriptor actionDescriptor) +153
System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +720
EPiServer.Shell.Services.Rest.RestControllerBase.ExecuteCore() +301
System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +305
EPiServer.Shell.Services.Rest.RestHttpHandler.ProcessRequest(HttpContextBase httpContext) +274
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +913
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +165


Has anyone idea what the duplicate entry might be? 

Apr 16, 2014 15:18

Also, I constantly receive following warnings to my Console.

Received message of type object from, expected a string all.js:53
Received message of type object from, expected a string all.js:53
Received message of type object from, expected a string all.js:53

Apr 16, 2014 15:20

Ok, the error is because database has duplicate Block Type definitions. The duplicates are identical, even the GUID is the same, but they have a different TypeID. The blockType is defined only in one class. 

How is this possible?

Edited, Apr 16, 2014 16:02

Hi Jouni

I am having the exact same issue. I have tow blocks types with the same GUID and Content Type Name but different Content TypeID. How did you manage to resolve this.

Oct 13, 2014 16:11

Hi Sayeed,

Try commenting out the whole duplicate ContentType definition in your code and restart the app. If memory serves, Episerver removed the invalid BlockType itself during startup. If not, try removing it by yourself. It should be possible now that it's not present in code.

Oct 13, 2014 18:01

Hi Jouni

I tried that. Whenever, I comment out the code for my Block Type, I get this error:

The DELETE statement conflicted with the REFERENCE constraint "FK_tblContentProperty_tblPropertyDefinition". The conflict occurred in database "dbLogicalisWebsite", table "dbo.tblContentProperty", column 'fkPropertyDefinitionID'. 
Oct 13, 2014 18:05

I guess that's because there are existing blocks of the dupicate BlockType. Can you delete them in anyway?

Oct 14, 2014 10:28

I had the same error & I deleted the content in the tables that I get the error & it solved the problem.

Feb 13, 2015 22:04
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.