Copied to clipboard

Flag this post as spam?

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


  • Mila 60 posts 79 karma points
    Mar 20, 2012 @ 14:37
    Mila
    0

    Deleting property from doc-type throws exception

    I have tryed to delete a document type in my project and I'm getting the follow message:

    Error handling action

    There was an error processing the request.

    The log viewer error shows:

    At /umbraco/settings/editNodeTypeNew.aspx?id=1082 (Referred by: http://butao.autotrac.com.br/umbraco/settings/editNodeTypeNew.aspx?id=1082): umbraco.DataLayer.SqlHelperException: Umbraco Exception (DataLayer): SQL helper exception in ExecuteNonQuery ---> System.Data.SqlClient.SqlException: The DELETE statement conflicted with the REFERENCE constraint "FK_cmsPropertyData_cmsPropertyType". The conflict occurred in database "umbraco", table "dbo.cmsPropertyData", column 'propertytypeid'.
    The statement has been terminated.
    at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
    at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
    at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
    at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
    at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
    at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
    at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters)
    at umbraco.DataLayer.SqlHelper`1.ExecuteNonQuery(String commandText, IParameter[] parameters)
    --- End of inner exception stack trace ---
    at umbraco.DataLayer.SqlHelper`1.ExecuteNonQuery(String commandText, IParameter[] parameters)
    at umbraco.cms.businesslogic.propertytype.PropertyType.delete()
    at umbraco.controls.ContentTypeControlNew.gpw_Delete(Object sender, EventArgs e)
    at System.EventHandler.Invoke(Object sender, EventArgs e)
    at System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e)
    at System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument)
    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

    I have no idea how to fix it.

    Can someone help me, please?

  • Rodion Novoselov 694 posts 859 karma points
    Mar 20, 2012 @ 14:55
    Rodion Novoselov
    0

    Hi. I've already seen something not exactly the same but very similar. That time I defeated it by simply turning on the "cascade delete" option on the FK causing the error. (Yeah, I stand against changing the database, but it just looked like the simplest way and actually you can turn cascade deletion back off right after performing what you need).

  • Mila 60 posts 79 karma points
    Mar 20, 2012 @ 15:33
    Mila
    0

    Hey Rodion,

    Thank you very much. I'll try it.

    Mila

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies