Copied to clipboard

Flag this post as spam?

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


  • Angel 50 posts 106 karma points
    Feb 03, 2016 @ 16:10
    Angel
    1

    SQL error copying a document type in Umbraco 7

    I wanted to move (or say copy, since there is no way to 'move' a document type node) that currently existed under a master document type.

    I created a new document type which would be my master. I then right clicked on a current document type, selected copy, and then pointed to the newly created document type 'master'.

    I get the following error:

    Cannot insert duplicate key row in object 'dbo.cmsPropertyType' with unique index 'IX_cmsPropertyTypeUniqueID'. The duplicate key value is (f9a05dc0-d239-461f-81b3-b0db9545c98d). The statement has been terminated.

    [SqlException (0x80131904): Cannot insert duplicate key row in object 'dbo.cmsPropertyType' with unique index 'IXcmsPropertyTypeUniqueID'. The duplicate key value is (f9a05dc0-d239-461f-81b3-b0db9545c98d). The statement has been terminated.] System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) +1791910 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) +5347106 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +546 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) +1693 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() +61 System.Data.SqlClient.SqlDataReader.getMetaData() +90 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +377 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds) +1421 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource1 completion, Int32 timeout, Task& task, Boolean asyncWrite) +177 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +53 System.Data.SqlClient.SqlCommand.ExecuteScalar() +152 StackExchange.Profiling.Data.ProfiledDbCommand.ExecuteScalar() in c:\Code\github\SamSaffron\MiniProfiler\StackExchange.Profiling\Data\ProfiledDbCommand.cs:311 Umbraco.Core.Persistence.<>c__DisplayClassa.<ExecuteScalarWithRetry>b__9() +91 Umbraco.Core.Persistence.FaultHandling.RetryPolicy.ExecuteAction(Func1 func) +332 Umbraco.Core.Persistence.PetaPocoCommandExtensions.ExecuteScalarWithRetry(IDbCommand command, RetryPolicy cmdRetryPolicy, RetryPolicy conRetryPolicy) +190 Umbraco.Core.Persistence.PetaPocoCommandExtensions.ExecuteScalarWithRetry(IDbCommand command, RetryPolicy retryPolicy) +137 Umbraco.Core.Persistence.PetaPocoCommandExtensions.ExecuteScalarWithRetry(IDbCommand command) +125 Umbraco.Core.Persistence.Database.Insert(String tableName, String primaryKeyName, Boolean autoIncrement, Object poco) +3169 Umbraco.Core.Persistence.Database.Insert(Object poco) +184 Umbraco.Core.Persistence.Repositories.ContentTypeBaseRepository1.PersistNewBaseContentType(ContentTypeDto dto, IContentTypeComposition entity) +4010 Umbraco.Core.Persistence.Repositories.ContentTypeRepository.PersistNewItem(IContentType entity) +421 Umbraco.Core.Cache.DefaultRepositoryCachePolicy2.CreateOrUpdate(TEntity entity, Action1 persistMethod) +452 Umbraco.Core.Persistence.Repositories.RepositoryBase2.PersistNewItem(IEntity entity) +387 Umbraco.Core.Persistence.UnitOfWork.PetaPocoUnitOfWork.Commit(Action`1 transactionCompleting) +198 Umbraco.Core.Persistence.UnitOfWork.PetaPocoUnitOfWork.Commit() +31 Umbraco.Core.Services.ContentTypeService.Save(IContentType contentType, Int32 userId) +275 Umbraco.Core.Services.ContentTypeService.Copy(IContentType original, String alias, String name, IContentType parent) +565 Umbraco.Core.Services.ContentTypeService.Copy(IContentType original, String alias, String name, Int32 parentId) +198 umbraco.dialogs.moveOrCopy.HandleDocumentTypeCopy() +361 umbraco.dialogs.moveOrCopy.HandleMoveOrCopy(Object sender, EventArgs e) +73 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +9627718 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) +9664310 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1724

    Is there a problem with copying document types in v7?

  • Jason 122 posts 637 karma points
    Feb 03, 2016 @ 16:54
    Jason
    0

    I ran into this issue also and was going to report it but got side track and forgot. So thanks for reminding me.

    http://issues.umbraco.org/issue/U4-7641

  • Edgar Rasquin 326 posts 925 karma points
    Feb 04, 2016 @ 13:26
    Edgar Rasquin
    0

    I am experiencing the same problem running Umbraco version 7.3.6 assembly: 1.0.5871.32302 with MS SQL Server 2012 on my local pc.

Please Sign in or register to post replies

Write your reply to:

Draft