U4-418 - Crash when rolling back a node with no associated template

Created by Sebastiaan Janssen 19 Aug 2012, 14:52:42 Updated by Sebastiaan Janssen 23 Aug 2012, 13:21:19

Right-click, rollback.

When a node has no allowed templates. It crashes with the following error...

The INSERT statement conflicted with the FOREIGN KEY constraint "FK_cmsDocument_cmsTemplate". The conflict occurred in database "umbraco-worldskills", table "dbo.cmsTemplate", column 'nodeId'. 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 INSERT statement conflicted with the FOREIGN KEY constraint "FK_cmsDocument_cmsTemplate". The conflict occurred in database "umbraco-worldskills", table "dbo.cmsTemplate", column 'nodeId'. 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 INSERT statement conflicted with the FOREIGN KEY constraint "FK_cmsDocument_cmsTemplate". The conflict occurred in database "umbraco-worldskills", table "dbo.cmsTemplate", column 'nodeId'. The statement has been terminated.] System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +2062078 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +5050204 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() +234 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2275 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +215 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +987 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +162 System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +178 System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +137 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) +21 umbraco.DataLayer.SqlHelper`1.ExecuteNonQuery(String commandText, IParameter[] parameters) +85

[SqlHelperException: Umbraco Exception (DataLayer): SQL helper exception in ExecuteNonQuery] umbraco.DataLayer.SqlHelper`1.ExecuteNonQuery(String commandText, IParameter[] parameters) +140 umbraco.cms.businesslogic.web.Document.RollBack(Guid VersionId, User u) +468 umbraco.presentation.dialogs.rollBack.doRollback_Click(Object sender, EventArgs e) +233 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +118 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +112 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) +36 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.225

''Originally created on CodePlex by [AnthonyDotNet|http://www.codeplex.com/site/users/view/AnthonyDotNet]'' on 8/19/2011 5:37:15 PM [Codeplex ID: 30421 - Codeplex Votes: 1]

Comments

Sebastiaan Janssen 23 Aug 2012, 13:21:13

Can't reproduce ion 4.8.1 must be fixed by now.


Priority: Normal

Type: Bug

State: Can't Reproduce

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions:

Due in version:

Sprint:

Story Points:

Cycle: