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) at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, XmlWriter results, XmlResolver documentResolver) at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, TextWriter results) at umbraco.macro.GetXsltTransformResult(XmlDocument macroXML, XslCompiledTransform xslt, Dictionary`2 parameters) at umbraco.presentation.umbraco.developer.Xslt.xsltVisualize.visualizeDo_Click(Object sender, EventArgs e)
As far as i have found out the "not chosen" from the ultimatepicker is not empty, when nothing is chosen, i have tryed > < null and empty string ' ' I cant figure out what the value is when nothing is chosen Maybee i wrong on this
Try moving the first two lines inside of the if block. Otherwise its trying to call GetMedia without verifying something is selected, which will result in that error:
Ultimatepicker - when nothing is chosen
Hi Forum
Umbraco version: umbraco v 4.11.4
What i try to do:
From a media folder i show some pdf files
These i load in a ultimate picker
The chosen PDF is avalible in the site for download
Now my problem
If nothing is chosen from the ultimatepicker, the "blue download box" on the site, should not be there.
But if i set the ultimatepicker to "not chosen" any of the pdf i cant get it to work
I have made a empty pdf and when i choose this one, it wont show any thing (As it should work)
I test to see if the chosen media is /media/25602/empty.pdfpdf17059 - if it is, nothing is displayed.
Othervise the download file is shown
Here is my xslt.
Recap
I want to: when nothing is chosen from the ultimatedropdown it should not show anything in the download box.
I cant figure out how to see if nothing is chosen.
any ideas.. ?
Tanks for this great CMS and forum
René
Hi,
I think rather than selecting an "Empty" PDF, you should just test for an empty value in your field, like so:
Hope this helps,
Tom
HI
Tanks for quick reply
When i test for this i get an error
Error parsing the XSLT:
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) at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, XmlWriter results, XmlResolver documentResolver) at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, TextWriter results) at umbraco.macro.GetXsltTransformResult(XmlDocument macroXML, XslCompiledTransform xslt, Dictionary`2 parameters) at umbraco.presentation.umbraco.developer.Xslt.xsltVisualize.visualizeDo_Click(Object sender, EventArgs e)
As far as i have found out the "not chosen" from the ultimatepicker is not empty, when nothing is chosen, i have tryed > < null and empty string ' '
I cant figure out what the value is when nothing is chosen
Maybee i wrong on this
Here is my xslt now.
Try moving the first two lines inside of the if block. Otherwise its trying to call GetMedia without verifying something is selected, which will result in that error:
Hi Tom
Tanks a lot, it worked.
Here is the final xslt
is working on a reply...