Copied to clipboard

Flag this post as spam?

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


  • Jack Wilson 4 posts 72 karma points
    Jan 21, 2015 @ 11:42
    Jack Wilson
    1

    Umbraco forms error after submitting

    I've created an Umbraco Contact form, which works, it sends the email to the selected account like it should, however, it doesn't record the entries in the backoffice and it gives me the following erorr:

    Server Error in '/' Application.
    
    Invalid column name 'UniqueId'.
    Invalid column name 'RecordData'.
    
    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: Invalid column name 'UniqueId'.
    Invalid column name 'RecordData'.
    
    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): Invalid column name 'UniqueId'.
    Invalid column name 'RecordData'.]
       System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +1789294
       System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +5340642
       System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +244
       System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) +1691
       System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() +61
       System.Data.SqlClient.SqlDataReader.get_MetaData() +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, TaskCompletionSource`1 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() +56
       Umbraco.Core.Persistence.FaultHandling.RetryPolicy.ExecuteAction(Func`1 func) +170
       Umbraco.Core.Persistence.PetaPocoCommandExtensions.ExecuteScalarWithRetry(IDbCommand command, RetryPolicy cmdRetryPolicy, RetryPolicy conRetryPolicy) +118
       Umbraco.Core.Persistence.PetaPocoCommandExtensions.ExecuteScalarWithRetry(IDbCommand command, RetryPolicy retryPolicy) +52
       Umbraco.Core.Persistence.PetaPocoCommandExtensions.ExecuteScalarWithRetry(IDbCommand command) +49
       Umbraco.Core.Persistence.Database.Insert(String tableName, String primaryKeyName, Boolean autoIncrement, Object poco) +1663
       Umbraco.Core.Persistence.Database.Insert(Object poco) +51
       Umbraco.Forms.Data.Storage.RecordStorage.InsertRecord(Record record, Form form) +498
       Umbraco.Forms.Web.Services.RecordService.storeRecord(Record record, Form form) in f:\TeamCity\buildAgent\work\133677a4e37ceece\Umbraco.Forms.Mvc\Services\RecordService.cs:28
       Umbraco.Forms.Web.Services.RecordService.Approve(Record record, Form form) in f:\TeamCity\buildAgent\work\133677a4e37ceece\Umbraco.Forms.Mvc\Services\RecordService.cs:106
       Umbraco.Forms.Web.Services.RecordService.Submit(Record record, Form form) in f:\TeamCity\buildAgent\work\133677a4e37ceece\Umbraco.Forms.Mvc\Services\RecordService.cs:92
       Umbraco.Forms.Web.Controllers.UmbracoFormsController.SubmitForm(Form form, FormViewModel model, Dictionary`2 state, ControllerContext context) in f:\TeamCity\buildAgent\work\133677a4e37ceece\Umbraco.Forms.Mvc\Controllers\UmbracoFormsController.cs:208
       Umbraco.Forms.Web.Controllers.UmbracoFormsController.GoForward(Form form, FormViewModel model, Dictionary`2 state) in f:\TeamCity\buildAgent\work\133677a4e37ceece\Umbraco.Forms.Mvc\Controllers\UmbracoFormsController.cs:154
       Umbraco.Forms.Web.Controllers.UmbracoFormsController.HandleForm(FormViewModel model, Boolean captchaIsValid) in f:\TeamCity\buildAgent\work\133677a4e37ceece\Umbraco.Forms.Mvc\Controllers\UmbracoFormsController.cs:114
       lambda_method(Closure , ControllerBase , Object[] ) +143
       System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +14
       System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +208
       System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +27
       System.Web.Mvc.Async.<>c__DisplayClass42.<BeginInvokeSynchronousActionMethod>b__41() +28
       System.Web.Mvc.Async.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) +10
       System.Web.Mvc.Async.WrappedAsyncResult`1.End() +57
       System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +48
       System.Web.Mvc.Async.<>c__DisplayClass39.<BeginInvokeActionMethodWithFilters>b__33() +57
       System.Web.Mvc.Async.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49() +223
       System.Web.Mvc.Async.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49() +223
       System.Web.Mvc.Async.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49() +223
       System.Web.Mvc.Async.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49() +223
       System.Web.Mvc.Async.<>c__DisplayClass37.<BeginInvokeActionMethodWithFilters>b__36(IAsyncResult asyncResult) +10
       System.Web.Mvc.Async.WrappedAsyncResult`1.End() +57
       System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +48
       System.Web.Mvc.Async.<>c__DisplayClass2a.<BeginInvokeAction>b__20() +24
       System.Web.Mvc.Async.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult) +102
       System.Web.Mvc.Async.WrappedAsyncResult`1.End() +57
       System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +43
       System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult) +14
       System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +23
       System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
       System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +57
       System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +23
       System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
       System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +47
       System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10
       System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +25
       System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +23
       System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
       System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +47
       System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
       System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9651116
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
    
    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34212
    
  • Lucas Chasteen 24 posts 92 karma points
    Jan 29, 2015 @ 21:11
    Lucas Chasteen
    0

    I'm experiencing this problem as well.  Apparently the database schema has changed between Contour and Forms.  Unfortunately the schema change is something that Red Gate SQLCompare can't automatically sync the two.  We were hoping to upgrade a number of sites from Contour to Forms and use Tim's migration package to (hopefully) silently update our users' forms.

    Has anyone else run into this problem or know of a nice fix?

     

  • Garpur Dagsson 29 posts 164 karma points
    Jan 30, 2015 @ 12:15
    Garpur Dagsson
    0

    I am having this problem also,

    does there exist a sql script I can run to fixit ?

    (I am guessing this is an incompatability between contour and forms)

     

    I tried updating to  4.0.1 (manually using UmbracoForms.Files.4.0.1.zip) it did not change anything :(

     

    I found out what was wrong in my instance,

    I had a conflict between the tables for contour and forms since I was doing "research" with this instance and installing/uninstalling stuff left and right.

    my solution was to uninstall contour and forms, drop the UF* tables and  reinstall forms manually from a downloaded zip.

    I could do this since I did not have any forms that needed preserving.

     

    To do this properly one should probably use this tool: http://our.umbraco.org/projects/developer-tools/umbraco-forms-migration

     

  • M N 125 posts 212 karma points
    Sep 10, 2015 @ 18:53
    M N
    0

    +1, thanks Garpur - I just dropped all those tables and it cleaned everything up. Note: There are several dependencies between the tables, so SSMS will yell at you. Just loop back around on the UF* tables until they are all dropped.

    If it helps anyone -

    UFRecordsXml table - Contour stores form submissions as XML

    UFRecords table - Stores submissions as JSON in the "RecordData" field.

    Cheers!

  • Lucas Chasteen 24 posts 92 karma points
    Feb 02, 2015 @ 16:28
    Lucas Chasteen
    0

    It's worth noting that the umbraco forms migration package listed above only appears to convert the forms from the DB to the new JSON format on the filesystem.  The submitted records (and subsequent tables) do not appear to be migrated which causes the initial error on submit.

  • Zac 223 posts 575 karma points
    Mar 29, 2015 @ 21:36
    Zac
    1

    EDIT: Solution here

    Could anyone clarify what tables need to be truncated (or deleted?) to solve this issue?

    We have migrated from Contour 3.0.25 to Umbraco Forms 4.0.2 (with 4.0.0 binaries). We used Tim's migrator which seems to have moved the forms OK, but as soon as we try to submit a form we get this same issue. We can probably (?) accept losing the submissions data, but definitely don't want to lose the created forms.

    Stacktrace:

    Invalid column name 'UniqueId'.
    Invalid column name 'RecordData'.
    
    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: Invalid column name 'UniqueId'.
    Invalid column name 'RecordData'.
    
    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): Invalid column name 'UniqueId'.
    Invalid column name 'RecordData'.]
       System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +388
       System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +815
       System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) +4515
       System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() +69
       System.Data.SqlClient.SqlDataReader.get_MetaData() +134
       System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +6553981
       System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds) +6556619
       System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite) +586
       System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +104
       System.Data.SqlClient.SqlCommand.ExecuteScalar() +270
       StackExchange.Profiling.Data.ProfiledDbCommand.ExecuteScalar() in c:\Code\github\SamSaffron\MiniProfiler\StackExchange.Profiling\Data\ProfiledDbCommand.cs:318
       Umbraco.Core.Persistence.<>c__DisplayClassa.<ExecuteScalarWithRetry>b__9() +159
       Umbraco.Core.Persistence.FaultHandling.RetryPolicy.ExecuteAction(Func`1 func) +545
       Umbraco.Core.Persistence.Database.Insert(String tableName, String primaryKeyName, Boolean autoIncrement, Object poco) +2877
       Umbraco.Core.Persistence.Database.Insert(Object poco) +58
       Umbraco.Forms.Data.Storage.RecordStorage.InsertRecord(Record record, Form form) +746
       Umbraco.Forms.Web.Services.RecordService.storeRecord(Record record, Form form) in f:\TeamCity\buildAgent\work\133677a4e37ceece\Umbraco.Forms.Mvc\Services\RecordService.cs:28
       Umbraco.Forms.Web.Services.RecordService.Approve(Record record, Form form) in f:\TeamCity\buildAgent\work\133677a4e37ceece\Umbraco.Forms.Mvc\Services\RecordService.cs:106
       Umbraco.Forms.Web.Services.RecordService.Submit(Record record, Form form) in f:\TeamCity\buildAgent\work\133677a4e37ceece\Umbraco.Forms.Mvc\Services\RecordService.cs:92
       Umbraco.Forms.Web.Controllers.UmbracoFormsController.SubmitForm(Form form, FormViewModel model, Dictionary`2 state, ControllerContext context) in f:\TeamCity\buildAgent\work\133677a4e37ceece\Umbraco.Forms.Mvc\Controllers\UmbracoFormsController.cs:208
       Umbraco.Forms.Web.Controllers.UmbracoFormsController.GoForward(Form form, FormViewModel model, Dictionary`2 state) in f:\TeamCity\buildAgent\work\133677a4e37ceece\Umbraco.Forms.Mvc\Controllers\UmbracoFormsController.cs:154
       Umbraco.Forms.Web.Controllers.UmbracoFormsController.HandleForm(FormViewModel model, Boolean captchaIsValid) in f:\TeamCity\buildAgent\work\133677a4e37ceece\Umbraco.Forms.Mvc\Controllers\UmbracoFormsController.cs:114
       lambda_method(Closure , ControllerBase , Object[] ) +167
       System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +270
       System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +39
       System.Web.Mvc.Async.<>c__DisplayClass39.<BeginInvokeActionMethodWithFilters>b__33() +120
       System.Web.Mvc.Async.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49() +452
       System.Web.Mvc.Async.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49() +452
       System.Web.Mvc.Async.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49() +452
       System.Web.Mvc.Async.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49() +452
       System.Web.Mvc.Async.<>c__DisplayClass37.<BeginInvokeActionMethodWithFilters>b__36(IAsyncResult asyncResult) +15
       System.Web.Mvc.Async.<>c__DisplayClass2a.<BeginInvokeAction>b__20() +33
       System.Web.Mvc.Async.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult) +240
       System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult) +28
       System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +15
       System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +53
       System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +15
       System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +42
       System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +15
       System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +606
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +288
    
Please Sign in or register to post replies

Write your reply to:

Draft