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)
OK - this happens when you save the XSLT, so how are you selecting the source variable? If it's based on $currentPage, you'll need to make sure it only tries to call the function when there's an actual value in $source - try checking the "Ignore errors" before saving - it should save OK, and if it works in frontend (on the page you want this to show) you can wrap an xsl:if around the call to make it save without errors, e.g.:
how to pass parameters as an int? or something like that "Flickr API Search"
I would like to make a macro with parameter where you can set volume of images in the Flickr API Search.
Error occured
System.Xml.Xsl.XslLoadException: Unexpected token '{' in the expression.
...:ByTag('tag', '', '', '', -->{<-- $source}, '', '', '') An error occurred at D:\hshome\jphamann\zinoflick.zargo.dk\xslt\634270169192196678_temp.xslt(17,3).
at System.Xml.Xsl.XslCompiledTransform.LoadInternal(Object stylesheet, XsltSettings settings, XmlResolver stylesheetResolver)
at System.Xml.Xsl.XslCompiledTransform.Load(XmlReader stylesheet, XsltSettings settings, XmlResolver stylesheetResolver)
at umbraco.presentation.webservices.codeEditorSave.SaveXslt(String fileName, String oldName, String fileContents, Boolean ignoreDebugging)
I do not know what to write to get it to work.
Cheers
Johan
Hi Johan,
Get rid of the curly braces around $source and you should be good to go (assuming everything else is OK).
/Chriztian
no good
Hide ErrorsError 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)
OK - this happens when you save the XSLT, so how are you selecting the source variable? If it's based on $currentPage, you'll need to make sure it only tries to call the function when there's an actual value in $source - try checking the "Ignore errors" before saving - it should save OK, and if it works in frontend (on the page you want this to show) you can wrap an xsl:if around the call to make it save without errors, e.g.:
/Chriztian
Thanks Chriztian
I always forget that it is running the code.new to this and xslt can be tricky. I try it as the first thing tomorrow.
Good damn it. it worked. and again to make a newbie error forget to always test the front end. super many thanks for your help Mr knowledge man.
By the way it does not work for me the
but I'm good with it right now.
Cheers,
Johan
ok ok ok I have it
I only got one picture out at a time, but only tag one picturer ... I can see that it was a minor detail.
So I spent some time finding a solution. our.umbraco.org/...-how-to-convert-umbracolibraryRenderTemplate-parameter-to-int32
And the solution is!
Great times
is working on a reply...