Copied to clipboard

Flag this post as spam?

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


  • Chris Ashton 57 posts 89 karma points
    Jun 04, 2015 @ 17:33
    Chris Ashton
    0

    Where are the Forms' database tables?

    Hi,

    I have an Umbraco 7.2.4 install that YSODs whenever a form is submitted.

    I've only just installed Forms and have dropped the licence in the /bin directory. The Umbraco back office indicates Forms is licensed. When a form is completed I get the following YSOD:

    enter image description here

    Inspection of the log files give:

        2015-06-04 15:47:18,979 [6] ERROR Umbraco.Core.UmbracoApplicationBase - [Thread 9] An unhandled exception occurred
    System.Data.SqlClient.SqlException (0x80131904): Invalid object name 'UFRecords'.
       at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
       at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
       at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
       at System.Data.SqlClient.SqlDataReader.get_MetaData()
       at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
       at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
       at System.Data.SqlClient.SqlCommand.ExecuteScalar()
       at StackExchange.Profiling.Data.ProfiledDbCommand.ExecuteScalar()
       at Umbraco.Core.Persistence.PetaPocoCommandExtensions.<>c__DisplayClassa.<ExecuteScalarWithRetry>b__9()
       at Umbraco.Core.Persistence.FaultHandling.RetryPolicy.ExecuteAction[TResult](Func`1 func)
       at Umbraco.Core.Persistence.Database.Insert(String tableName, String primaryKeyName, Boolean autoIncrement, Object poco)
       at Umbraco.Core.Persistence.Database.Insert(Object poco)
       at Umbraco.Forms.Data.Storage.RecordStorage.InsertRecord(Record record, Form form)
       at Umbraco.Forms.Web.Services.RecordService.storeRecord(Record record, Form form)
       at Umbraco.Forms.Web.Services.RecordService.Approve(Record record, Form form)
       at Umbraco.Forms.Web.Services.RecordService.Submit(Record record, Form form)
       at Umbraco.Forms.Web.Controllers.UmbracoFormsController.SubmitForm(Form form, FormViewModel model, Dictionary`2 state, ControllerContext context)
       at Umbraco.Forms.Web.Controllers.UmbracoFormsController.GoForward(Form form, FormViewModel model, Dictionary`2 state)
       at Umbraco.Forms.Web.Controllers.UmbracoFormsController.HandleForm(FormViewModel model, Boolean captchaIsValid)
       at lambda_method(Closure , ControllerBase , Object[] )
       at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
       at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
       at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass42.<BeginInvokeSynchronousActionMethod>b__41()
       at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass37.<>c__DisplayClass39.<BeginInvokeActionMethodWithFilters>b__33()
       at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49()
       at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49()
       at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49()
       at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49()
       at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass37.<BeginInvokeActionMethodWithFilters>b__36(IAsyncResult asyncResult)
       at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass25.<>c__DisplayClass2a.<BeginInvokeAction>b__20()
       at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult)
       at System.Web.Mvc.Controller.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult)
       at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar)
       at System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult)
       at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar)
       at System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult)
       at System.Web.Mvc.MvcHandler.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult)
       at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar)
       at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)
       at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
    ClientConnectionId:99401b2f-bc3a-4440-aa15-20729ede0293
    

    When I Submit a form the form is successfully emailed to an admin user.

    I've also noticed the database tables UFRecords* don't appear to exist.

    Has anyone got any ideas for fixing this, maybe a script to create the required database tables. Why are the tables missing?

    Many thanks, Chris

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Jun 04, 2015 @ 20:06
    Dennis Aaen
    100

    Hi Chris,

    You should have a table in your database called UFRecords if you have Umbraco Forms install. Like the screenshot below.

    enter image description here

    If you don´t have it then try to see Tim´s comment in this thread https://our.umbraco.org/forum/umbraco-pro/contour/63644-Umbraco-forms-database-table he provides the sql script to create the missing UFRecords database table.

    Hope this helps,

    /Dennis

  • Chris Ashton 57 posts 89 karma points
    Jun 05, 2015 @ 16:35
    Chris Ashton
    0

    Hi Denis,

    Thanks for the reply.

    I've ran Tim's script, and on the face of it things appear to work fine, although I notice I'm missing the UFUserFormSecurity and UFUserSercurity tables. I can't see reference to these tables in Tim's script?

    Kind regards, Chris

  • Chris Wilson 100 posts 377 karma points
    Jun 05, 2015 @ 17:14
    Chris Wilson
    0

    Hi Chris,

    It sounds like the user you're running the application as doesn't have the rights to create new database tables, the easiest way to correct this is, inside SQL Server Management Studio to go to:

    Security > Logins > [App pool user's name] > Properties > User Mapping

    Then make sure that your app pool's user has the db_owner attribute set on the Umbraco db inside your SQL instance.

    /Chris

  • Chris Ashton 57 posts 89 karma points
    Jun 05, 2015 @ 17:45
    Chris Ashton
    0

    Hi Chris,

    Thanks for the reply.

    The same user was able to create the database tables UFRecordDataBit, UFRecordDataDateTime, UFRecordDataInteger, UFRecordDataLongString, UFRecordDataString, UFRecordFields, and UFRecords when I ran Tim's script, so I don't think it's likely to be a database user permissions thing? Also, Tim's script doesn't mention the missing tables.

    Cheers, Chris

  • marcelh 171 posts 471 karma points
    Jul 29, 2015 @ 10:02
    marcelh
    0

    Same here, did you figure out if you need the missing UFUser tables?

  • Chris Ashton 57 posts 89 karma points
    Jul 29, 2015 @ 14:31
    Chris Ashton
    0

    Hi Marcelh – the site is still missing those tables, but form submission appears to be being successfully processed with the simple workflow we have for this site.

    Please report back here if you find any differently.

    Cheers, Chris

Please Sign in or register to post replies

Write your reply to:

Draft