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, XPathNavigator type, XPathNavigator topXnews)
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)
But when i "skip testing" .. theres nothing wrong with the XSLT? :-s
To clarify, this is because the xslt parser checks the xslt using the top node as a reference. If your root node doesn't contain these properties an error will be thrown. Disabling testing will allow the file to save and work, but as it will also hide any other errors throwing a test around your loop is the best way to go.
CMS bug or XSLT error? - System.OverflowException ..
To get a better understanding of XSLT ..
why does:
+
=
But when i "skip testing" .. theres nothing wrong with the XSLT? :-s
Because the "StayNews" method expects a value, and as the parser can never be sure that a value is present, it throws an exception.
The fix is easy, surround you for each with a test:
I think its because there is nothing for the for-each to evaluate. Try putting this around:
Damn too late :)
Haha, great answer Jannik :-)
thanks guys .. so .. its a bit like the media-picker ""problem"" when extracting images .. :-)
but why does my other extensions not behave the same way then? they are almost identical?
To clarify, this is because the xslt parser checks the xslt using the top node as a reference. If your root node doesn't contain these properties an error will be thrown. Disabling testing will allow the file to save and work, but as it will also hide any other errors throwing a test around your loop is the best way to go.
is working on a reply...