Copied to clipboard

Flag this post as spam?

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


  • Yannick Smits 321 posts 718 karma points
    Jan 04, 2011 @ 12:09
    Yannick Smits
    1

    Input string was not in a correct format

     

     

    I've created a contour form with several field types: textfield, radiobuttonlist, file upload, datepicker, mandatory fields, e-mail regex checker and when I submit the form the result gets added to the "entries" but the page ends in an error:

     

    Input string was not in a correct format.

    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.FormatException: Input string was not in a correct format.

    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: 

    [FormatException: Input string was not in a correct format.]
       System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +9594283
       System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +119
       System.Convert.ToInt32(String value) +48
       Umbraco.Forms.UI.Usercontrols.RenderForm.RenderUi() in d:\TeamCity\buildAgent\work\e4473b9ec9597356\Umbraco.Forms.UI\Usercontrols\RenderForm.ascx.cs:397
       Umbraco.Forms.UI.Usercontrols.RenderForm.nextPage(Object sender, EventArgs e) in d:\TeamCity\buildAgent\work\e4473b9ec9597356\Umbraco.Forms.UI\Usercontrols\RenderForm.ascx.cs:207
       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
    

     

    I don't have the source of RenderForm.ascx.cs so can't lookup what exactly it can't convert to an Int. 

    I'm using umbraco 4.6 beta with contour 1.1.0.24499

     

  • Yannick Smits 321 posts 718 karma points
    Jan 04, 2011 @ 12:28
    Yannick Smits
    0

    One strange thing to notice is that when viewing the form using the preview instead of via the macro (previewFormDialog.aspx) it works fine!

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jan 04, 2011 @ 14:21
    Sebastiaan Janssen
    0

    I would recommend you try upgrading to 1.4.1.1 and try again, I seem to recall that I've seen this problem in older versions, but it went away after I upgraded.

  • Yannick Smits 321 posts 718 karma points
    Jan 04, 2011 @ 15:18
    Yannick Smits
    0

    problem is still there after upgrading.

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jan 04, 2011 @ 15:21
    Sebastiaan Janssen
    1

    Hmm, weird! Okay, so what kinds of workflow items do you have for this form? And do you have it set to redirect to a node after submission? Maybe the node has not been picked?

  • Yannick Smits 321 posts 718 karma points
    Jan 04, 2011 @ 15:24
    Yannick Smits
    0

    wow, good catch! I had it set to redirect to: child::* [@isDoc].

    What would be the correct xpath to redirect to the first child of the current page?

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jan 04, 2011 @ 15:36
    Sebastiaan Janssen
    0

    You could try child::* [@isDoc]/@id instead.

  • Yannick Smits 321 posts 718 karma points
    Jan 04, 2011 @ 16:18
    Yannick Smits
    0

    hmm doesn't work. Same error still.

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jan 04, 2011 @ 16:33
    Sebastiaan Janssen
    0

    I'm wondering where you enter that XPATH anyway? I wasn't aware that there was anything but a content picker on the form that will do the redirect?

  • Yannick Smits 321 posts 718 karma points
    Jan 04, 2011 @ 16:35
    Yannick Smits
    0

    in the form settings tab it says at the bottom: Or enter Xpath

    -

     

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jan 04, 2011 @ 16:40
    Sebastiaan Janssen
    1

    Ah okay, that's a new one for me! Can you use $currentPage/child::* [@isDoc]/@id maybe?

  • Yannick Smits 321 posts 718 karma points
    Jan 04, 2011 @ 16:45
    Yannick Smits
    0

    works!

  • Laurence Gillian 600 posts 1219 karma points
    Apr 01, 2011 @ 17:34
    Laurence Gillian
    0

    Ah so glad this forum thread existed, saved my bacon!

    Would it be possible to throw a more logically error such as, "XPath does not resolve to @id"

    But something which makes sense, rather than my retarded english. /L (:

Please Sign in or register to post replies

Write your reply to:

Draft