Copied to clipboard

Flag this post as spam?

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


  • Dan Sunesen 45 posts 145 karma points
    Apr 22, 2013 @ 15:25
    Dan Sunesen
    0

    Error on submit

    Hey Umbracians.

    So, I have this Contour form, where I can insert Name, Email and a Message. However, when I try to submit my form, I get the following error:

     

     

    Server Error in '/' Application.

    The INSERT statement conflicted with the FOREIGN KEY constraint "FK_UFRecordDataString_UFRecordFields". The conflict occurred in database "DatabaseName", table "dbo.UFRecordFields", column 'Key'.
    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_UFRecordDataString_UFRecordFields". The conflict occurred in database "DatabaseName", table "dbo.UFRecordFields", column 'Key'.
    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_UFRecordDataString_UFRecordFields". The conflict occurred in database "DatabaseName", table "dbo.UFRecordFields", column 'Key'.
    The statement has been terminated.]
       System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +404
       System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() +412
       System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1363
       System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +6387805
       System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +6389506
       System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +538
       System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +689
       System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +327
       Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters) +167
       umbraco.DataLayer.SqlHelper`1.ExecuteNonQuery(String commandText, IParameter[] parameters) +150
    
    [SqlHelperException: Umbraco Exception (DataLayer): SQL helper exception in ExecuteNonQuery]
       umbraco.DataLayer.SqlHelper`1.ExecuteNonQuery(String commandText, IParameter[] parameters) +261
       Umbraco.Forms.Data.Storage.RecordFieldValueStorage.InsertRecordFieldValues(RecordField rf) +1102
       Umbraco.Forms.Data.Storage.RecordFieldStorage.UpdateRecordField(RecordField recordField) +538
       Umbraco.Forms.Data.Storage.RecordStorage.UpdateRecord(Record record, Form form) +1820
       Umbraco.Forms.Core.Services.RecordService.() +234
       Umbraco.Forms.Core.Services.RecordService.Approve() +119
       Umbraco.Forms.Core.Services.RecordService.NextPage() +170
       Umbraco.Forms.UI.Usercontrols.RenderForm.nextPage(Object sender, EventArgs e) +242
       System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +154
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3707

     

     

    Any clue?

     

    Br
    Dan

     

  • Comment author was deleted

    Apr 22, 2013 @ 15:59

    Hmm what version of Contour are you running? + db engine (sql server, mysql) ? + did you perform an Contour upgrade recently ?

  • Dan Sunesen 45 posts 145 karma points
    Apr 23, 2013 @ 08:29
    Dan Sunesen
    0

    Contour version 3.0.9, SQL Server 2008 - and I have not done any upgrade recently.

  • Comment author was deleted

    Apr 23, 2013 @ 10:05

    Hmm that's strange, could you try saving the form in the backoffice, does that work or do you also get an error? And does it contain the same fields in the designer and when you output the form?

  • Dan Sunesen 45 posts 145 karma points
    Apr 23, 2013 @ 12:41
    Dan Sunesen
    0

    I get no errors when saving the form. And yes, it does contain the same fields.

  • Comment author was deleted

    Apr 23, 2013 @ 13:09

    Ok thanks for the extra details, any chance I can take a look at the site, you can mail details to tg at umbraco dot com

  • Dan Sunesen 45 posts 145 karma points
    May 03, 2013 @ 10:18
    Dan Sunesen
    0

    Hey Tim, thanks for helping out. 

    Solution: delete the old form and create a new one! :)

  • Comment author was deleted

    May 03, 2013 @ 10:45

    Yeah must have gotten corrupted in some way but new forms and other existing forms worked fine...

Please Sign in or register to post replies

Write your reply to:

Draft