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?
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?
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!
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 avalue-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?Examples:
<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.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?
If not I think you should report this as a bug on the issue tracker.
Looking forward to hearing from you.
/Jan
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!
http://issues.umbraco.org/issue/U4-5925
A sad testament to the perception of XSLT at the HQ that this has slipped through release testing :-/
I just had a pull request to fix this accepted. It will be in 7.2.1 https://github.com/umbraco/Umbraco-CMS/pull/587
is working on a reply...