Copied to clipboard

Flag this post as spam?

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


  • Jason Prothero 422 posts 1243 karma points MVP c-trib
    May 14, 2010 @ 22:55
    Jason Prothero
    0

    Error when using the "Save as umbraco document" workflow type for certain fields

    I'm trying to use Contour to create new content nodes in Umbraco and I'm having trouble during the workflow setup. 

    When I try to map text fields to properties in my Document Type (including Node Name) I get the error below.

    It appears to be that there isn't enough space on my Document Type properties in SQL Server to store the infomation from me Contour Form.  But there isn't a way to limit the size of the fields in Contour (from what I can tell). 

    As a side note, its saves OK when I map Contour fields to only field that are set as "Textbox Multiple" types.

     

    String or binary data would be truncated.
    The statement has been terminated.

    Stack Trace:

    [SqlException (0x80131904): String or binary data would be truncated.
    The statement has been terminated.]
    System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +1950890
    System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4846875
    System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194
    System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2392
    System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +204
    System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +954
    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) +175
    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) in d:\TeamCity\buildAgent\work\7380c184e9fcd3ea\umbraco\datalayer\SqlHelpers\SqlServer\SqlServerHelper.cs:64
    umbraco.DataLayer.SqlHelper`1.ExecuteNonQuery(String commandText, IParameter[] parameters) in d:\TeamCity\buildAgent\work\7380c184e9fcd3ea\umbraco\datalayer\SqlHelper.cs:217

    [SqlHelperException: Umbraco Exception (DataLayer): SQL helper exception in ExecuteNonQuery]
    umbraco.DataLayer.SqlHelper`1.ExecuteNonQuery(String commandText, IParameter[] parameters) in d:\TeamCity\buildAgent\work\7380c184e9fcd3ea\umbraco\datalayer\SqlHelper.cs:221
    Umbraco.Forms.Data.Storage.SettingsStorage.InsertSettings(Guid id, Dictionary`2 settings) in d:\TeamCity\buildAgent\work\39da791f9304089a\Umbraco.Forms.Core\Data\SettingsStorage\SettingsStorage.cs:52
    Umbraco.Forms.Data.Storage.SettingsStorage.UpdateSettings(Guid id, Dictionary`2 settings) in d:\TeamCity\buildAgent\work\39da791f9304089a\Umbraco.Forms.Core\Data\SettingsStorage\SettingsStorage.cs:63
    Umbraco.Forms.Data.Storage.WorkflowStorage.UpdateWorkflow(Workflow workflow) in d:\TeamCity\buildAgent\work\39da791f9304089a\Umbraco.Forms.Core\Data\WorkflowStorage\WorkflowStorage.cs:170
    Umbraco.Forms.UI.Dialogs.editWorkflowDialog.Button1_Click(Object sender, EventArgs e) in d:\TeamCity\buildAgent\work\39da791f9304089a\Umbraco.Forms.UI\Dialogs\editWorkflowDialog.aspx.cs:144
    System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
    System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
    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) +1565
  • Jason Prothero 422 posts 1243 karma points MVP c-trib
    May 14, 2010 @ 23:24
    Jason Prothero
    0

    Just tried updating to the latest nightly (1.0.10) and now I can map to node name, but I'm still getting the error on some other fields.

    If I only map to the node name, I do get an item published in the content tree on submission, so that works.  Its just the setup of the mapping that is throwing the exception.

  • Jason Prothero 422 posts 1243 karma points MVP c-trib
    May 18, 2010 @ 21:27
    Jason Prothero
    0

    I guess I need to contact support on this one...

  • Tom Fulton 2030 posts 4998 karma points c-trib
    May 18, 2010 @ 22:50
    Tom Fulton
    0

    Hi Jason,

    One thought might be to change the Database Datatype for the "Textstring" datatype from Nvarchar to Ntext.  Ntext is what the Textbox Multiple uses, and since you're not having problems there I would assume that's the issue.

    Note - (I think) changing this (might) cause you to lose data typed into existing Textstring fields.  You could try adding a new data type or test on a dev box first :).  Also I don't know if using ntext for all your textboxes would cause any performance issues, so maybe better to add a new datatype anyway if that works for you.

    Thanks,

    Tom

  • Jason Prothero 422 posts 1243 karma points MVP c-trib
    May 19, 2010 @ 00:30
    Jason Prothero
    0

    Thanks for the reply Tom, I'll probably have to try that. I was thinking I could change all the fields to multiline text fields, but that looks funny on the Content Page.  Perhaps a new Datatype could give a single line text field but use ntext in the database.

    I'm also hoping that the Contour team can take a look and perhaps see if its a bug.

  • Comment author was deleted

    May 19, 2010 @ 08:17

    Hi Jason,

    The mappings get saved in a single db field, so it looks like when you map a lot of fields the field isn't big enough. It should be easy to fix by just a simple db update.

    Will check which table and field and report back.

    Regards,
    Tim

  • Comment author was deleted

    May 19, 2010 @ 08:28

    Hi Jason,

    It's the Value column in the UFSettings table that is causing the problem (so updated that so it can store more then 1000 chars should fix the problem)

  • Jason Prothero 422 posts 1243 karma points MVP c-trib
    May 20, 2010 @ 21:52
    Jason Prothero
    1

    Tim, you are awesome.  I knew there was a simple answer that I was missing.  I set it to nvarchar(MAX) and it worked like a dream.

    Seriously, that feature alone makes Contour so fricken cool. 

     

    Thanks!

Please Sign in or register to post replies

Write your reply to:

Draft