Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • lele 102 posts 429 karma points
    Jan 23, 2012 @ 11:47
    lele
    0

    List all images from a media picker in a folder

    hi al

    i have a doc type with a media picker for to pick up a folder with images. i want to show this images for all pages in a node, but i' ve got this 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)

     

    here is the part of code which fails:

    <xsl:for-each select="umbraco.library:GetMedia($currentPage/galleryImageFolder, true())/Image">
      <xsl:if test="umbracoFile !=''">
          <li>
            <img src="/imageGen.ashx?image={umbraco.library:UrlEncode(umbracoFile)}&amp;height=100&amp;constrain=true" alt="{umbracoFile}" />
          </li>
      </xsl:if>                
    </xsl:for-each>

     

    have some one some idea what i do wrong?

    many thanks!

  • Jeroen Breuer 4861 posts 12138 karma points MVP 3x admin c-trib
    Jan 23, 2012 @ 11:50
    Jeroen Breuer
    0

    Have a look at this topic: http://our.umbraco.org/forum/developers/xslt/27854-Help-with-mediapicker. Think it's the same problem.

    Jeroen

  • Rodion Novoselov 694 posts 859 karma points
    Jan 23, 2012 @ 13:42
    Rodion Novoselov
    0

    That's a very typical error message almost always caused by an attempt to pass empty node value to an extension function that accepts numbers. Personally I made myself follow the rule always to wrap such constructions with.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies