Copied to clipboard

Flag this post as spam?

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


  • Matt Taylor 873 posts 2086 karma points
    Jan 11, 2011 @ 14:36
    Matt Taylor
    0

    Error deleting property from top most document type

    I've been working on a new install of umbraco v 4.5.2 (Assembly version: 1.0.3891.20719)for about a day now.

    I have created a document type called 'Master' and some others that inherit from it.

    In the Master document type I've got some properties in a new tab called 'Featured' that will be inherited by the child document types.

    I've created some content items already and although I these items have the properties from the Master document type, I've not actually populated them with anythng yet.

    I decided that I didn't want one of properties in the top most document type Master so I deleted it only to see the following error.

    I'm sure I've done this before in a previous version of Umbraco without any problem.

    Any suggestions?

    Thanks.

    The DELETE statement conflicted with the REFERENCE constraint "FK_cmsPropertyData_cmsPropertyType". The conflict occurred in database "www_eypdas_org_uk", table "dbo.cmsPropertyData", column 'propertytypeid'.
    The statement has been terminated.

    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.SqlClient.SqlException: The DELETE statement conflicted with the REFERENCE constraint "FK_cmsPropertyData_cmsPropertyType". The conflict occurred in database "www_eypdas_org_uk", table "dbo.cmsPropertyData", column 'propertytypeid'.
    The statement has been terminated.

    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:

    [SqlException (0x80131904): The DELETE statement conflicted with the REFERENCE constraint "FK_cmsPropertyData_cmsPropertyType". The conflict occurred in database "www_eypdas_org_uk", table "dbo.cmsPropertyData", column 'propertytypeid'.
    The statement has been terminated.]
    System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +109
    System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +57
    System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +207
    System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2421
    System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async) +191
    System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +256
    System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +117
    Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(SqlConnection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters) +56
    Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters) +83
    umbraco.DataLayer.SqlHelpers.SqlServer.SqlServerHelper.ExecuteNonQuery(String commandText, SqlParameter[] parameters) +113
    umbraco.DataLayer.SqlHelper`1.ExecuteNonQuery(String commandText, IParameter[] parameters) +140

    [SqlHelperException: Umbraco Exception (DataLayer): SQL helper exception in ExecuteNonQuery]
    umbraco.DataLayer.SqlHelper`1.ExecuteNonQuery(String commandText, IParameter[] parameters) +222
    umbraco.cms.businesslogic.propertytype.PropertyType.delete() +252
    umbraco.controls.ContentTypeControlNew.gpw_Delete(Object sender, EventArgs e) +112
    umbraco.controls.GenericProperties.GenericPropertyWrapper.GenericPropertyWrapper_Delete(Object sender, EventArgs e) +73
    System.EventHandler.Invoke(Object sender, EventArgs e) +0
    umbraco.controls.GenericProperties.GenericProperty.DeleteButton_Click(Object sender, ImageClickEventArgs e) +73
    System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +78
    System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +118
    System.Web.UI.WebControls.ImageButton.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) +36
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2821



  • Matt Taylor 873 posts 2086 karma points
    Jan 11, 2011 @ 14:56
    Matt Taylor
    0

    I've looked at the cmsProprtyType table, identified the ID of the property I'm trying to deleted and checked the associated cmsPropertyData records.

    Most of the dataInt, dataDate, dataNvarchar, dataNtext values were NULL, some were not NULL but empty so I've changed those to be NULL but I still get the same error.

    Surely I shouldn't have to delete the records from the cmsPropertyData table for this property. This seems quite fundamental.

Please Sign in or register to post replies

Write your reply to:

Draft