Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Barry Fogarty 493 posts 1129 karma points
    Apr 07, 2014 @ 12:55
    Barry Fogarty
    0

    Installation error: A data type with the name 'xxx' already exists

    Hi Kevin and thanks.  Just got round to installing the update for Umbraco v6.2 we discussed here - but it fails with the error:

    A data type with the name Content Image Picker already exists

    Source File: d:\Projects\_OpenSource\Umbraco\6.2\src\umbraco.cms\businesslogic\datatype\DataTypeDefinition.cs    Line: 144 

    Stack Trace: 

    [DuplicateNameException: A data type with the name Content Image Picker already exists]
       umbraco.cms.businesslogic.datatype.DataTypeDefinition.Save() in d:\Projects\_OpenSource\Umbraco\6.2\src\umbraco.cms\businesslogic\datatype\DataTypeDefinition.cs:144
       jumps.umbraco.usync.SyncDataType.ReadFromDisk(String path) +255
       jumps.umbraco.usync.SyncDataType.ReadAllFromDisk() +57
       jumps.umbraco.usync.uSync.ReadAllFromDisk() +140
       jumps.umbraco.usync.uSync.RunSync() +279
       jumps.umbraco.usync.uSync.DoOnStart() +111
       jumps.umbraco.usync.uSync.OnApplicationStarted(UmbracoApplicationBase httpApplication, ApplicationContext applicationContext) +5
       Umbraco.Core.CoreBootManager.<Complete>b__4(IApplicationEventHandler x) +19
       Umbraco.Core.EnumerableExtensions.ForEach(IEnumerable`1 items, Action`1 action) +141
       Umbraco.Core.CoreBootManager.Complete(Action`1 afterComplete) +119
       Umbraco.Web.WebBootManager.Complete(Action`1 afterComplete) +38
       Umbraco.Core.UmbracoApplicationBase.StartApplication(Object sender, EventArgs e) +157
       Umbraco.Core.UmbracoApplicationBase.Application_Start(Object sender, EventArgs e) +9
    
    [HttpException (0x80004005): A data type with the name Content Image Picker already exists]
       System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +9905689
       System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +118
       System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
       System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +336
       System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296
    
    [HttpException (0x80004005): A data type with the name Content Image Picker already exists]
       System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9885044
       System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
       System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254

     

    I saw the previeous thread which looked like a similar error, so I checked the uSync.config file which exists with the default settings. (This is the first install of uSync).  I also enable log4net Debug and I did note I was getting the following warnings on some Masterpages:

    INFO  Umbraco.Core.Services.PackagingService - [Thread 1] Template 'uBlogsyBaseSite' has an invalid Master 'uBlogsyBase', so the reference has been ignored.

    There is no idication in the code why the master is invalid, the file exists and works fine as a template.  It seems that all objects are serialised to disk OK apart from those ignored due to the invalid master.  Other than that, I don't think there is any other relevant info in the log but I have iunicluded the last few entries FYI.

     

    2014-04-07 11:40:07,397 [5] DEBUG jumps.umbraco.usync.SyncStylesheet - [Thread 1] Stylesheet Install: D:\Projects\.....Site\uSync\StyleSheet\token-input.config

    2014-04-07 11:40:07,400 [5] DEBUG jumps.umbraco.usync.SyncStylesheet - [Thread 1] Stylesheet Install: D:\Projects\.....Site\uSync\StyleSheet\twitter.config

    2014-04-07 11:40:07,403 [5] DEBUG jumps.umbraco.usync.SyncStylesheet - [Thread 1] Stylesheet Install: D:\Projects\.....Site\uSync\StyleSheet\uBlogsy.config

    2014-04-07 11:40:07,420 [5] DEBUG jumps.umbraco.usync.SyncDataType - [Thread 1] usync - Match Import: for Attachment Picker

    2014-04-07 11:40:07,420 [5] DEBUG jumps.umbraco.usync.SyncDataType - [Thread 1] Getting Pre-Values

    2014-04-07 11:40:07,422 [5] DEBUG jumps.umbraco.usync.SyncDataType - [Thread 1] uSync - Match Import: Counts [20 Existing] [20 New]

    2014-04-07 11:40:07,422 [5] DEBUG jumps.umbraco.usync.SyncDataType - [Thread 1] uSync - Match Import: Complete

    2014-04-07 11:40:07,432 [5] DEBUG jumps.umbraco.usync.SyncDataType - [Thread 1] usync - Match Import: for Content Image Picker

    2014-04-07 11:40:07,432 [5] DEBUG jumps.umbraco.usync.SyncDataType - [Thread 1] Getting Pre-Values

    2014-04-07 11:40:07,433 [5] DEBUG jumps.umbraco.usync.SyncDataType - [Thread 1] uSync - Match Import: Counts [20 Existing] [20 New]

    2014-04-07 11:40:07,433 [5] DEBUG jumps.umbraco.usync.SyncDataType - [Thread 1] uSync - Match Import: Complete

    2014-04-07 11:40:07,434 [5] ERROR Umbraco.Core.UmbracoApplicationBase - [Thread 1] An unhandled exception occurred

    System.Data.DuplicateNameException: A data type with the name Content Image Picker already exists

       at umbraco.cms.businesslogic.datatype.DataTypeDefinition.Save() in d:\Projects\_OpenSource\Umbraco\6.2\src\umbraco.cms\businesslogic\datatype\DataTypeDefinition.cs:line 144

       at jumps.umbraco.usync.SyncDataType.ReadFromDisk(String path)

       at jumps.umbraco.usync.SyncDataType.ReadAllFromDisk()

       at jumps.umbraco.usync.uSync.ReadAllFromDisk()

       at jumps.umbraco.usync.uSync.RunSync()

       at jumps.umbraco.usync.uSync.DoOnStart()

       at jumps.umbraco.usync.uSync.OnApplicationStarted(UmbracoApplicationBase httpApplication, ApplicationContext applicationContext)

       at Umbraco.Core.CoreBootManager.<Complete>b__4(IApplicationEventHandler x)

       at Umbraco.Core.EnumerableExtensions.ForEach[TItem](IEnumerable`1 items, Action`1 action)

       at Umbraco.Core.CoreBootManager.Complete(Action`1 afterComplete)

       at Umbraco.Web.WebBootManager.Complete(Action`1 afterComplete)

       at Umbraco.Core.UmbracoApplicationBase.StartApplication(Object sender, EventArgs e)

       at Umbraco.Core.UmbracoApplicationBase.Application_Start(Object sender, EventArgs e)

    2014-04-07 11:40:17,439 [5] INFO  umbraco.BusinessLogic.Log - [Thread 27] Log scrubbed.  Removed all items older than 2014-02-06 11:40:17

    2014-04-07 11:40:17,444 [5] INFO  Umbraco.Core.UmbracoApplicationBase - [Thread 27] Application shutdown. Reason: InitializationError

  • Peter Gregory 408 posts 1614 karma points MVP 3x admin c-trib
    May 28, 2014 @ 08:34
    Peter Gregory
    0

    I'm having the same issue with uSync 2.2.6 on Umbraco 7.1.1 The error I have is pretty much exactly the same. The Trace output is below.

    This is when I take a blank Umbraco install and copy the uSync files over it fails on startup. If I suppress the uSync errors in the config and go to Import from the dashboard the same issue occurs.

    Any help would be much appreciated.

    A data type with the name Richtext editor already exists
    
    Description: An unhandled exception occurred during the execution of the current web request. Please review the     stack trace for more information about the error and where it originated in the code. 
    
    Exception Details: System.Data.DuplicateNameException: A data type with the name Richtext editor already exists
    
    Source Error: 
    
    An unhandled exception was generated during the execution of the current web request. Information regarding the     origin and location of the exception can be identified using the exception stack trace below.
    
    Stack Trace: 
    
    
    [DuplicateNameException: A data type with the name Richtext editor already exists]
       Umbraco.Core.Persistence.Repositories.DataTypeDefinitionRepository.PersistNewItem(IDataTypeDefinition entity) +1130
       Umbraco.Core.Persistence.Repositories.RepositoryBase`2.PersistNewItem(IEntity entity) +156
       Umbraco.Core.Persistence.UnitOfWork.PetaPocoUnitOfWork.Commit(Action`1 transactionCompleting) +231
       Umbraco.Core.Persistence.UnitOfWork.PetaPocoUnitOfWork.Commit() +7
       Umbraco.Core.Services.DataTypeService.Save(IEnumerable`1 dataTypeDefinitions, Int32 userId) +262
       Umbraco.Core.Services.PackagingService.ImportDataTypeDefinitions(XElement element, Int32 userId, Boolean raiseEvents) +1405
       jumps.umbraco.usync.SyncDataType.ReadFromDisk(String path) +441
       jumps.umbraco.usync.SyncDataType.ReadAllFromDisk() +146
       jumps.umbraco.usync.uSync.ReadAllFromDisk() +217
       jumoo.usync.ui.uSyncUi.btnImport_Click(Object sender, EventArgs e) +86
       System.Web.UI.WebControls.Button.OnClick(EventArgs e) +9614758
       System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +103
       System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +35
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1724
    
  • Kevin Jump 2309 posts 14673 karma points MVP 7x c-trib
    May 28, 2014 @ 12:51
    Kevin Jump
    0

    Hi I've had a quick look, and it looks like the error is happening inside the umbraco package service which is what usync is using to put datatypes in.

    The packaging service can usually cope fine with putting datatypes in when they already there - it does this all the time - but in your cases it looks like it isn't finding the existing datatypes trying to create new ones and failing. (see package service code).

    The only thing I can think of is that the Datatype IDs have changed between v6 and v7 for some types so where in v6 these internal ids are GUIDs for v7 they are text strings. so maybe this is causing an issue if you are moving between v6/v7 installs? if this is what's happening give us a shout and i will investigate that further, if not then i will have to look elsewhere, datatype importing has never been my favourite thing to debug.

  • Barry Fogarty 493 posts 1129 karma points
    May 28, 2014 @ 14:38
    Barry Fogarty
    0

    In my case Kevin, I was only using v6.2RC.  This is was upgraded from 4.10.  I did not get uSync to work though, so it is no longer installed on the site.

  • Alex Skrypnyk 6131 posts 23950 karma points MVP 7x admin c-trib
    Feb 16, 2015 @ 12:25
    Alex Skrypnyk
    0

    Hi,

    We have the same error:

    2015-02-16 13:24:56,772 [41] ERROR Umbraco.Core.UmbracoApplicationBase - [Thread 57] An unhandled exception occurred
    System.Data.DuplicateNameException: A data type with the name Content grid already exists
       в Umbraco.Core.Persistence.Repositories.DataTypeDefinitionRepository.PersistNewItem(IDataTypeDefinition entity)
       в Umbraco.Core.Persistence.Repositories.RepositoryBase`2.PersistNewItem(IEntity entity)
       в Umbraco.Core.Persistence.UnitOfWork.PetaPocoUnitOfWork.Commit(Action`1 transactionCompleting)
       в Umbraco.Core.Services.DataTypeService.Save(IDataTypeDefinition dataTypeDefinition, Int32 userId)
       в Vega.USiteBuilder.DataTypeManager.SynchronizeDataTypes()
       в Vega.USiteBuilder.UmbracoManager.Synchronize()
       в Vega.USiteBuilder.UmbracoManager.SynchronizeIfNotSynchronized()
       в System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
       в System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
    
  • Alex Skrypnyk 6131 posts 23950 karma points MVP 7x admin c-trib
    Feb 16, 2015 @ 12:51
    Alex Skrypnyk
    0

    How we can remove dataType via SQL ?

  • Kevin Jump 2309 posts 14673 karma points MVP 7x c-trib
    Feb 20, 2015 @ 15:11
    Kevin Jump
    0

    Hi Alex - 

    this error actually looks like an issue with uSiteBuilder and not uSync, but it is failing calling the core API save method, 

    I don't really know where the DataTypes are saved in SQL. I try to avoid looking at the database :) but if you forced me to ,i would be looking in. cmsDataType and cmsDataTypePreValues

    but i suspect their are lots dependcies around.

     

     

     

  • Alex Skrypnyk 6131 posts 23950 karma points MVP 7x admin c-trib
    Feb 20, 2015 @ 15:39
    Alex Skrypnyk
    0

    Hi Kevin,

    You are right, it was problem with uSiteBuilder, it has some problems with existing dataTypes. Next project we will work without codeFirst ))

    Thanks

  • Paul Stephenson 19 posts 129 karma points
    Apr 09, 2015 @ 10:08
    Paul Stephenson
    0

    Hi Kevin,

    Thanks for uSync!

    I am getting the same error with Umbraco 7.2.1 and uSync 2.4.10.

    I installed uSync on a dev server (by copying files over from source control via a continuous integration server) and everything was fine.

    I then took a copy of the live database and replaced the dev database with its contents (but with the same dev code files and uSync files there). This was also fine.

    I then committed a new version of the code to source control, together with a selection of new and updated items stored by uSync. When this deployed to the dev site, I get the following error:

    [DuplicateNameException: A data type with the name Image Cropper - mobile ad already exists]
       jumps.umbraco.usync.uSync.RunSync() +687
       jumps.umbraco.usync.uSync.DoOnStart() +138
       Umbraco.Core.EnumerableExtensions.ForEach(IEnumerable`1 items, Action`1 action) +148
       Umbraco.Core.CoreBootManager.Complete(Action`1 afterComplete) +116
       Umbraco.Web.WebBootManager.Complete(Action`1 afterComplete) +49
       Umbraco.Core.UmbracoApplicationBase.StartApplication(Object sender, EventArgs e) +243
    
    [HttpException (0x80004005): A data type with the name Image Cropper - mobile ad already exists]
       System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +12962661
       System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +175
       System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +304
       System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +404
       System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +475
    
    [HttpException (0x80004005): A data type with the name Image Cropper - mobile ad already exists]
       System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +12979668
       System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +159
       System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +12819261
    

    Interestingly, the "Image Cropper - mobile ad" data type was not one of the changed items.

    Any ideas? Could there have been a conflict during the database restore from live perhaps?

  • Alex Skrypnyk 6131 posts 23950 karma points MVP 7x admin c-trib
    Apr 10, 2015 @ 18:04
    Alex Skrypnyk
    0

    Hi Kevin,

    We have the same problem. We aren't using uSiteBuilder anymore, but we have this problem after deleting and creating datatype again:

    [DuplicateNameException: A data type with the name Top Big Banners Picker already exists]
       jumps.umbraco.usync.uSync.RunSync() +687
       jumps.umbraco.usync.uSync.DoOnStart() +138
       Umbraco.Core.EnumerableExtensions.ForEach(IEnumerable`1 items, Action`1 action) +148
       Umbraco.Core.CoreBootManager.Complete(Action`1 afterComplete) +116
       Umbraco.Web.WebBootManager.Complete(Action`1 afterComplete) +95
       Umbraco.Core.UmbracoApplicationBase.StartApplication(Object sender, EventArgs e) +243
    
    [HttpException (0x80004005): A data type with the name Top Big Banners Picker already exists]
       System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +12639357
       System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +175
       System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +304
       System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +404
       System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +475
    
    [HttpException (0x80004005): A data type with the name Top Big Banners Picker already exists]
       System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +12656404
       System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +159
       System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +12496021
    
  • Alex Skrypnyk 6131 posts 23950 karma points MVP 7x admin c-trib
    Apr 11, 2015 @ 17:52
    Alex Skrypnyk
    0

    Problem is when you deleting and than creating dataType with the same name.

    It fixes when you change Guid Id of datatype in the uSync folder.

    Thanks

  • Paul Stephenson 19 posts 129 karma points
    Apr 13, 2015 @ 11:09
    Paul Stephenson
    1

    Thanks Alex -- that put me on the right track.

    It turned out that my continuous deployment script wasn't actually deploying my uSync changes properly!

    Ultimately the problem was as you described:

    • The initial installation of uSync on the dev server (before the copy from live) wrote out a config file for the "Image Cropper - mobile ad" data type, with GUID cdaa21...
    • Meanwhile, the live database had previously had the "Image Cropper - mobile ad" data type added manually, so it had a different GUID of b9dbd5...
    • My source-controlled uSync file for the data type had the GUID b9dbd5 too, because I had previously taken a copy of live for my local machine when I first add uSync to source control
    • When I copied the database from live to dev, the dev database had GUID b9dbd5 but its uSync file had cdaa21
    • Because I didn't deploy the uSync files correctly, uSync tried to add the data type with the GUID cdaa21 (from the old files) onto the dev database that now had the data type with GUID b9dbd5. This is where the duplicate name error occurred, because it seems that uSync does not (or cannot) notice when a data type is being added with the same name but a different GUID as the one already there.

    Alex, I imagine you are seeing the same effect when deleting and re-adding a data type, because a fresh GUID will be used whenever adding a data type definition through the Umbraco UI.

    The moral of the story seems to be to ensure that any data types are only ever added through the UI once throughout all installations, and thereafter always copied via uSync.

    I don't know if uSync could have the ability to notice when a data type GUID is different, and sort it all out (presumably updating the database GUIDs to match the uSync file's) -- Kevin, any thoughts on this?

  • Alex Skrypnyk 6131 posts 23950 karma points MVP 7x admin c-trib
    Apr 13, 2015 @ 17:53
    Alex Skrypnyk
    0

    Thanks Paul, great explanation, now uSync works like you described, I think it would be great to have some notifications, like :

    There 2 datatypes with the same name but different Guid, what should we use?

    And drop-down list for choosing right datatype ))

    Thanks

  • Alex Skrypnyk 6131 posts 23950 karma points MVP 7x admin c-trib
    Apr 27, 2015 @ 11:03
    Alex Skrypnyk
    0

    Another possibility to fix this issue, manually change 'uniqueID' in the 'umbracoNode' table. All ids should be unique.

    Thanks, Alex

Please Sign in or register to post replies

Write your reply to:

Draft