Hi there, I was wondeing if there was a way be able to help me troubleshoot this issue. On the front page of a client's website, I get the following error:
Based on some preliminary research that I have done, I was believe that the issue here might lie with the NiceURL bit. I added the debug parameters to the URL and was able to find this all in bold red:
umbracoMacro InnerException
Value was either too large or too small for an Int32. 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 System.Xml.Xsl.CompiledQuery.Query.<xsl:template match="/">(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator {urn:schemas-microsoft-com:xslt-debug}current, Double {urn:schemas-microsoft-com:xslt-debug}position, Double {urn:schemas-microsoft-com:xslt-debug}last, IList`1 {urn:schemas-microsoft-com:xslt-debug}namespaces) in C:\WEBSITES_Test\lfh.switchfast.net\xslt\ServiceSelection.xslt:line 31 at System.Xml.Xsl.CompiledQuery.Query.<xsl:apply-templates>(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator , Double , Double ) at System.Xml.Xsl.CompiledQuery.Query.Root(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime) at System.Xml.Xsl.CompiledQuery.Query.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.macro.loadMacroXSLT(macro macro, MacroModel model, Hashtable pageElements)
0.0234591267884605
0.000581
As a result, I was wondering if there's a way to be able to pin-point the issue. My \xslt\ServiceSelection.xslt code looks like the following:
It's been a good several weeks since you posted this, not sure if you've already resolved this?
I believe the reason for the error is either the call to GetXmlNodeById or NiceUrl - my guess would be its NiceUrl. To get around this, you'll need to wrap the link with an <xsl:if> to test that the @id has a value:
<xsl:if test="$selectedTribute/@id != ''">
<p class="readmore"><a href="{umbraco.library:NiceUrl($selectedTribute/@id)}">READ MORE ></a></p>
</xsl:if>
Issues parsing my ServiceSElection.xslt file.
Hi there, I was wondeing if there was a way be able to help me troubleshoot this issue. On the front page of a client's website, I get the following error:
Error parsing XSLT file: \xslt\ServiceSelection.xslt.
Based on some preliminary research that I have done, I was believe that the issue here might lie with the NiceURL bit. I added the debug parameters to the URL and was able to find this all in bold red:
As a result, I was wondering if there's a way to be able to pin-point the issue. My \xslt\ServiceSelection.xslt code looks like the following:
I am running Umbraco v. 4 with ASP.NET v.4 in a Windows IIS 6. environment.
Any help would be greatly appreciated!
Hi Hector,
It's been a good several weeks since you posted this, not sure if you've already resolved this?
I believe the reason for the error is either the call to GetXmlNodeById or NiceUrl - my guess would be its NiceUrl. To get around this, you'll need to wrap the link with an <xsl:if> to test that the @id has a value:
Cheers, Lee.
is working on a reply...