I have added images to my mdeia section that I am attempting to access via xslt. It works in the development environment which is version 4.7.1.1 but fails in version 4.7.2. I have the following error:
If is failing at the assignment of the variable mediaItem. See code snippet:
I was able to solve the problem using Courier. Some how it worked when I transfered the files from my development box to the server. No changes were made to the code. Thanks anyway.
XSLT for images giving an error in 4.7.2
I have added images to my mdeia section that I am attempting to access via xslt. It works in the development environment which is version 4.7.1.1 but fails in version 4.7.2. I have the following error:
If is failing at the assignment of the variable mediaItem. See code snippet:
<xsl:variable name="mediaItem" select="umbraco.library:GetMedia(pioneerImage, 0)" />
<xsl:if test="$mediaItem">
<img>
<xsl:attribute name="src">
<xsl:value-of select="$mediaItem/umbracoFile" />
</xsl:attribute>
<xsl:attribute name="width">
<xsl:value-of select="27" />
</xsl:attribute>
<xsl:attribute name="height">
<xsl:value-of select="35" />
</xsl:attribute>
<xsl:attribute name="alt">
<xsl:value-of select="@nodeName"/>
</xsl:attribute>
</img>
</xsl:if>
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)
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.presentation.webservices.codeEditorSave.SaveXslt(String fileName, String oldName, String fileContents, Boolean ignoreDebugging)
Hi Paul,
Please, try change your checking of data.
I was able to solve the problem using Courier. Some how it worked when I transfered the files from my development box to the server. No changes were made to the code. Thanks anyway.
is working on a reply...