Copied to clipboard

Flag this post as spam?

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

  • Thomas Brinegar 84 posts 162 karma points
    Dec 02, 2014 @ 14:44
    Thomas Brinegar

    GetMedia Not Working with Upgrade to 7.1.9

    Just recently upgraded the development site to version 7.1.9 from a 7.0.X instance. I've noticed that umbraco.library:GetMedia in XSLT is no longer working. I've attempted to just get the output in a value-of statement, but this is returning empty.

    When I output just the property itself, I am getting the media ID so I am certain that it is getting passed to the GetMedia method. Anyone else experiencing this?


    <xsl:value-of select="$currentPage/firstContentImage" />

    Returns ID of media node.

    <xsl:value-of select="umbraco.library:GetMedia($currentPage/firstContentImage, 0)/umbracoFile" />

    Empty output.

    <img src="{umbraco.library:GetMedia($currentPage/firstContentImage, 0)/umbracoFile}" alt="{$currentPage/seoPageTitle} Graphic" title="" />

    Src attribute is empty.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Dec 02, 2014 @ 15:19
    Jan Skovgaard

    Hi Thomas

    Does it change anything if you change 0 to 1? It should then give you the full XML if you have for instance selected a folder containing medias etc. But just try to see if it returns anything when that param is changed.

    If you make a copy-of like below do you then get any XML returned?

    <xsl:copy-of select="umbraco.library:GetMedia($currentPage/firstContentImage, 1)/umbracoFile" />

    If not I think you should report this as a bug on the issue tracker.

    Looking forward to hearing from you.


  • Thomas Brinegar 84 posts 162 karma points
    Dec 02, 2014 @ 15:25
    Thomas Brinegar

    Thanks for the reply Jan.

    Changing the second parameter doesn't appear to make a difference. I get some whitespace output in the textarea, but that's about it. I'll report the issue, thanks!

  • Dan Okkels Brendstrup 101 posts 197 karma points
    Dec 03, 2014 @ 15:03
    Dan Okkels Brendstrup

    A sad testament to the perception of XSLT at the HQ that this has slipped through release testing :-/

  • Peter Gregory 408 posts 1614 karma points MVP 3x admin c-trib
    Dec 11, 2014 @ 07:53
    Peter Gregory

    I just had a pull request to fix this accepted. It will be in 7.2.1

Please Sign in or register to post replies

Write your reply to: