Copied to clipboard

Flag this post as spam?

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


  • Carlos 338 posts 472 karma points
    Aug 06, 2012 @ 20:21
    Carlos
    0

    umbraco.library.GetMedia issue not rendering - XSLT

    We have found that since we updated to 4.7.1 that the XSLT umbraco.library.GetMedia is randomly not working.  We have randomly generated cross promotions set up via XSLT across our site.  The umbraco.library.GetMedia randomly stops showing images in our cross promos. Every single cross promo has an image to show that is being called.  But for some reason the GetMedia method seems like it doesn't fire. We are searching all nodes and then getting the cross promos if they are flagged in a certain category.  All that is working, but the image that goes with the cross promo stops showing up.  We republish the pages and that seems to work for about an hour, then the images stop showing up again.  We have tracked it down that it has to be something with the GetMedia method.

    We have over 2000 pages to our site and about 3/4 are cross promoted throughout the site.  Is there a fix for this?

    I just found this post and they indicated that when they set the Library Cache duration to 0 that it fixed it. We just did the same thing and it seems like it worked too.  Is there a bug with the Library Cache setting and is there a fix?

    <UmbracoLibraryCacheDuration>0</UmbracoLibraryCacheDuration>

    http://our.umbraco.org/forum/developers/api-questions/15484-umbracolibraryGetMedia-only-finding-node-on-first-try-after-Republish-Entire-Site

     

     

    Thanks

  • Thomas M Ziirsen 4 posts 34 karma points
    Apr 12, 2013 @ 10:06
    Thomas M Ziirsen
    0

    Was there ever a fix for this, while maintaining caching?

    Im having the same problem on 4.8.1 . The site has been running smooth for 4-5 months, but now all of a suddon images stop beeing displayed via XSLT. One "save and publish" on a random node fixes it for a few hour tho. The image nodeID is in the umbraco.config at all times when i check so it dosnt loose the value there, only on the XSLT render. Never seen this kind of behaviour, very odd.

    Gonna try the "UmbracoLibraryCacheDuration" hope it helps.

  • Charles Afford 1163 posts 1709 karma points
    Apr 14, 2013 @ 21:35
    Charles Afford
    0

    Hi, could you post the xslt your are using? and have you tried 

    <textarea><xsl:copy-of select="$currentPage"/></textarea>

    to see what xml is being outputted

  • Thomas M Ziirsen 4 posts 34 karma points
    Apr 15, 2013 @ 11:27
    Thomas M Ziirsen
    0

    This is the XSLT:

    <img src="{umbraco.library:GetMedia(./productImage, 0)/umbracoFile}" class="productImage" alt="/>

     

    But since i changed the "UmbracoLibraryCacheDuration" it seems to have solved it. Now everything gets rendered every time.

    The cutomer is happy, everyone is happy, win win :)

  • Charles Afford 1163 posts 1709 karma points
    Apr 15, 2013 @ 21:19
    Charles Afford
    0

    Hmmmm seems a bit strange but glad you fixed it :)

Please Sign in or register to post replies

Write your reply to:

Draft