This is probably thrown because one of the nodes you're processing has no value in the umbracoInternalRedirectId property (may not even have the property).
It's always thrown by one of the library methods that take a Node ID (e.g. GetMedia(), NiceUrl(), GetXmlNodeById() etc.)
You can take the property into to XPath if you're really only interested in nodes with that property, e.g.:
Check the XML and you'll see why... using only a star in the XPath will get you childnodes AND properties of the selected node(s) up until that point in the XPath. Try adding the DocumentType filter ([@isDoc]) and see if that works.
Otherwise, there's a node somewhere with a bad value in the property you're sending to NiceUrl().
System.OverflowException: Value was either too large or too small for an Int32.
Hey Guys....
Im trying to list some document at the end of this XSLT, however i get an error - It seems that the error occours an the end at this:
<xsl:if test="$ToolbarFolder != ''">
<xsl:for-each select="umbraco.library:GetXmlNodeById($ToolbarFolder)/* [@isDoc]">
<li>
<xsl:if test="position() = 1">
<xsl:attribute name="class">last</xsl:attribute>
</xsl:if>
<a href="{umbraco.library:NiceUrl(number(umbracoInternalRedirectId))}">
<xsl:value-of select="@nodeName"/>
</a>
</li>
</xsl:for-each>
</xsl:if>
If i delete this, i dont get an error, however, i dont get my subpages listed also...
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet [
<!ENTITY nbsp " ">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxml="urn:schemas-microsoft-com:xslt" xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets" exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets ">
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:key name="document-by-id" match="*[@isDoc]" use="@id"/>
<xsl:param name="currentPage"/>
<xsl:template match="/">
<!--<textarea><xsl:copy-of select="$currentPage/."/></textarea>-->
<xsl:variable name="ToolbarFolder" select="$currentPage/ancestor-or-self::* [@isDoc and contains(name(),'js_home')] [position()=1]/ToolbarFolder/@id"/>
<xsl:value-of select="$ToolbarFolder" />
<nav class="toolbar">
<ul>
<xsl:if test="$ToolbarFolder != ''">
<xsl:for-each select="umbraco.library:GetXmlNodeById($ToolbarFolder)/* [@isDoc]">
<li>
<xsl:if test="position() = 1">
<xsl:attribute name="class">last</xsl:attribute>
</xsl:if>
<a href="{umbraco.library:NiceUrl(number(umbracoInternalRedirectId))}">
<xsl:value-of select="@nodeName"/>
</a>
</li>
</xsl:for-each>
</xsl:if>
</ul>
</nav>
</xsl:template>
</xsl:stylesheet>
Any suggestions?
Hi Nicky,
This is probably thrown because one of the nodes you're processing has no value in the umbracoInternalRedirectId property (may not even have the property).
It's always thrown by one of the library methods that take a Node ID (e.g. GetMedia(), NiceUrl(), GetXmlNodeById() etc.)
You can take the property into to XPath if you're really only interested in nodes with that property, e.g.:
/Chriztian
Perfect, that worked :) Thx Chriztian... You Rock! :)
Hey Chriztian...
I get the same error on this, do you know why ?
<xsl:for-each select="umbraco.library:GetXmlNodeById($ToolbarFolder)/*">
<li>
<a href="{umbraco.library:NiceUrl(@id)}">
<xsl:value-of select="@nodeName"/>
</a>
</li>
</xsl:for-each>
If i normalize-space on the for-each, like you did, then there's a node in the folder that doens't output doesnt't ouput?
I have 2 nodes/pages, but only one will output if i use the normalize-space[(umbracoInternalRedirectId)]
Hi Nicky,
Check the XML and you'll see why... using only a star in the XPath will get you childnodes AND properties of the selected node(s) up until that point in the XPath. Try adding the DocumentType filter ([@isDoc]) and see if that works.
Otherwise, there's a node somewhere with a bad value in the property you're sending to NiceUrl().
/Chriztian
Ahh, great... isDoc does the trick :) Thx again... :)
is working on a reply...