System.OverflowException: Value was either too large or too small for an Int32.
I'm getting this error when saving this problem xslt file (I couldn't get it to format - so linked to it)
Error occured
System.OverflowException: Value was either too large or too small for an Int32. at System.Convert.ToInt32(Double value) at System.Double.System.IConvertible.ToInt32(IFormatProvider provider) at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider) at System.Xml.Xsl.Runtime.XmlQueryRuntime.ChangeTypeXsltArgument(XmlQueryType xmlType, Object value, Type destinationType) at System.Xml.Xsl.Runtime.XmlQueryContext.InvokeXsltLateBoundFunction(String name, String namespaceUri, IList`1[] args) at (XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime) at Root(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime) at Execute(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime) at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlSequenceWriter results) at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter writer, Boolean closeWriter) at System.Xml.Xsl.XmlILCommand.Execute(IXPathNavigable contextDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter results) at System.Xml.Xsl.XmlILCommand.Execute(IXPathNavigable contextDocument, XmlResolver dataSources, XsltArgumentList argumentList, TextWriter results) at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, TextWriter results) at umbraco.presentation.webservices.codeEditorSave.SaveXslt(String fileName, String oldName, String fileContents, Boolean ignoreDebugging)
It wasn't happening previously to this, and the only thing I have done is add an li to another xslt file.
I did a debug using umbraco?umbDebugShowTrace=true - and nothing showed up in red, and when I looked through - data was showing for the xslt file...
I want these to test to see if there is a value - if there is, then output the <li>, if not, then so nothing... should I be using xsl:when and xsl:otherwise here?
System.OverflowException: Value was either too large or too small for an Int32.
I'm getting this error when saving this problem xslt file (I couldn't get it to format - so linked to it)
It wasn't happening previously to this, and the only thing I have done is add an li to another xslt file.
I did a debug using umbraco?umbDebugShowTrace=true - and nothing showed up in red, and when I looked through - data was showing for the xslt file...
Any help would be most appreciated :)
OK - I'm still stuck with this, but I 'think' it related to the variables I am using here
And the solution lies with doing a test like this
But I have no clue where to put the 'if tests'.... do I wrap the whole code block in 3 if tests? If so in what order?
Sorry - xslt newbide/dummy
Ok - fixed - nothing to do with the xslt (blush) - it was a media picker Datatype which was selecting an unpublished node.
But - I thought I had this covered with this code:
I want these to test to see if there is a value - if there is, then output the <li>, if not, then so nothing... should I be using xsl:when and xsl:otherwise here?
is working on a reply...