Copied to clipboard

Flag this post as spam?

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


  • Dan Evans 629 posts 1016 karma points
    Aug 20, 2013 @ 11:03
    Dan Evans
    0

    Error on upgrade from 6.0.5 to 6.1.3

    Getting this error on the front-end on upgrade from 6.0.5 to 6.1.3

    Input string was not in a correct format

    Server Error in '/' Application.

    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) +14419385
       System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +305
       umbraco.macro.AddMacroXmlNode(XmlDocument umbracoXml, XmlDocument macroXml, String macroPropertyAlias, String macroPropertyType, String macroPropertyValue) +1885
       umbraco.macro.LoadMacroXslt(macro macro, MacroModel model, Hashtable pageElements, Boolean throwError) +902
       umbraco.macro.renderMacro(Hashtable pageElements, Int32 pageId) +2214
       umbraco.presentation.templateControls.Macro.CreateChildControls() +1829
       System.Web.UI.Control.EnsureChildControls() +189
       System.Web.UI.Control.InitRecursive(Control namingContainer) +186
       System.Web.UI.Control.InitRecursive(Control namingContainer) +421
       System.Web.UI.Control.InitRecursive(Control namingContainer) +421
       System.Web.UI.Control.InitRecursive(Control namingContainer) +421
       System.Web.UI.Control.InitRecursive(Control namingContainer) +421
       System.Web.UI.Control.InitRecursive(Control namingContainer) +421
       System.Web.UI.Control.InitRecursive(Control namingContainer) +421
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2098
    



    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18044

  • Dan Evans 629 posts 1016 karma points
    Aug 20, 2013 @ 11:51
    Dan Evans
    0

    Solved:

    We had a macro with a parameter of type mediaCurrent. 

    In the XSLT the macro referenced the parameter as /macro/imageID/*/@id

    If imageID was empty this threw an errow for some reason (never has done before).

    Solution was to change the parameter type to number and just pass through the id in the macro: /macro/imageID

  • William Schwartz 16 posts 85 karma points
    May 07, 2014 @ 19:43
    William Schwartz
    0

    Dan, I know you came up with a workaround, but instead of creating a new post with the same issue I figured I just tag along here.

    So I have the same issue and here's my problem.

    I have a macro where, among other things, a user selects an image (it's the only reason to choose the macro) and can optionally choose another image as a target. Both are mediaCurrent parameters where one could be empty. When both parameters have a value it's not an issue but when one is blank IIS throws the OP's error.

    Not sure how to get around this. Is it possible to set a default value for a parameter to bypass the error? Or is there another way to have a user select a media node?

    -Wm

  • Dan Evans 629 posts 1016 karma points
    May 08, 2014 @ 09:32
    Dan Evans
    0

    I don't know I'm afraid as my Macro wasn't being used in the content editor so worked fine with just a number.

    My only suggestion would be to convert the macro to Razor maybe?

  • William Schwartz 16 posts 85 karma points
    May 08, 2014 @ 19:26
    William Schwartz
    0

    Thanks Dave, I may give that a try.

    -Wm

Please Sign in or register to post replies

Write your reply to:

Draft