Copied to clipboard

Flag this post as spam?

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


  • dmd 3 posts 23 karma points
    Jun 18, 2010 @ 22:18
    dmd
    0

    umbraco.library:GetMember Issue

    I'm using umbraco v 4.0.4.2

    I have a member picker data type with the alias "staff"

    This displays the member id

    <xsl:variable name="staff_member" select="$currentPage/data[@alias='staff']"/>
    <xsl:value-of select="$staff_member" />

    I'm trying to use the staff_member variable to access one of the member properties.

    When I do this

    <xsl:value-of select="umbraco.library:GetMember($staff_member)/data [@alias = 'zipcode']"/>
    I get this error - System.OverflowException: Value was either too large or too small for an Int32.

    When I do this it works
    <xsl:value-of select="umbraco.library:GetMember(1001)/data [@alias = 'zipcode']"/>

    Any ideas how to fix this So I can use umbraco.library:GetMember without hardcoding?

  • Jonas Eriksson 930 posts 1825 karma points
    Jun 18, 2010 @ 22:33
    Jonas Eriksson
    0

    Hi!

    You need to add a <xsl:if test="$staff_member!=''"> ... </xsl:if>

    Otherwise the parser will give you that error (and also on runtime if someone has a null for "staff").

Please Sign in or register to post replies

Write your reply to:

Draft