U4-2782 - 6.1.2 mediaCurrent macro parameter ParseInt32 error when blank

Created by Lee Morton 03 Sep 2013, 10:31:56 Updated by Sebastiaan Janssen 05 Feb 2014, 14:46:07

I've noticed an issue with a pre-existing macro since upgrading to version 6. The macro has three mediaCurrent parameters. This macro can be embedded in a richtext editor and if any of these paremeters are left unselected it causes a System.FormatException "Input string was not in a correct format" on a call to ParseInt32. Even if the XSLT is empty the error still occurs so it seems to be some internal code called on all parameters of the type mediaCurrent.

I notice some other uses have posted in the forum with what seems to be the same issue: http://our.umbraco.org/forum/getting-started/installing-umbraco/44179-Error-on-upgrade-from-605-to-613

Comments

Lee Morton 03 Sep 2013, 10:35:38

Here is the stack trace:

[FormatException: Input string was not in a correct format.] System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +9595563 System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +119 umbraco.macro.AddMacroXmlNode(XmlDocument umbracoXml, XmlDocument macroXml, String macroPropertyAlias, String macroPropertyType, String macroPropertyValue) +1432 umbraco.macro.LoadMacroXslt(macro macro, MacroModel model, Hashtable pageElements, Boolean throwError) +401 umbraco.macro.renderMacro(Hashtable pageElements, Int32 pageId) +2814 umbraco.presentation.templateControls.Macro.CreateChildControls() +1700 System.Web.UI.Control.EnsureChildControls() +102 umbraco.presentation.templateControls.Macro.OnInit(EventArgs e) +34 System.Web.UI.Control.InitRecursive(Control namingContainer) +140 System.Web.UI.Control.AddedControl(Control control, Int32 index) +197 System.Web.UI.ControlCollection.Add(Control child) +79 umbraco.presentation.templateControls.<>c__DisplayClass6.b__2(String macroAlias, Dictionary2 attributes) +282 Umbraco.Core.Macros.MacroTagParser.ParseMacros(String text, Action1 textFoundCallback, Action`2 macroFoundCallback) +592 umbraco.presentation.templateControls.ItemRenderer.ParseMacros(Item item) +190 umbraco.presentation.templateControls.ItemRenderer.Load(Item item) +83 umbraco.presentation.templateControls.Item.OnLoad(EventArgs e) +21 System.Web.UI.Control.LoadRecursive() +74 System.Web.UI.Control.LoadRecursive() +146 System.Web.UI.Control.LoadRecursive() +146 System.Web.UI.Control.LoadRecursive() +146 System.Web.UI.Control.LoadRecursive() +146 System.Web.UI.Control.LoadRecursive() +146 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207


Sebastiaan Janssen 05 Feb 2014, 14:46:01

Fixed in revision 5e0fbe5634ececedd7f9cddf4371028d34ad9db1


Priority: Normal

Type: Bug

State: Fixed

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 6.1.2, 6.1.3

Due in version: 6.2.0

Sprint:

Story Points:

Cycle: