Copied to clipboard

Flag this post as spam?

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


  • DavidS 17 posts 38 karma points
    Sep 21, 2010 @ 17:41
    DavidS
    0

    Update from 4.5.0 to 4.5.2 problem with GetMedia

    Hi,

    I've just updated Umbraco from version 4.5.0 to 4.5.2 and everything worked fine apart from items which use GetMedia. I've used xsl:copy-of to try and see what is output and it was as follows:

    <img path="-1,1473,2261" nodetypealias="Image" writername="Administrator" urlname="bookatable" nodename="Book a table" updatedate="2010-09-06T09:45:27" createdate="2010-09-06T09:29:11" sortorder="4" template="0" nodetype="1032" writerid="0" level="2" parentid="1473" version="2db44eee-4524-49e7-b592-70352dd61296" id="2261"><umbracofile>/media/78133/book-a-table.gif</umbracofile><umbracowidth>176</umbracowidth><umbracoheight>97</umbracoheight><umbracobytes>13235</umbracobytes><umbracoextension>gif</umbracoextension><alttext></alttext><img width="" height="" alt="" src="">

    So far so good. However as soon as I add /Image or /Image/umbracoFile, nothing gets returned.

    Any ideas?

     

    David

  • DavidS 17 posts 38 karma points
    Sep 21, 2010 @ 18:01
    DavidS
    0
    <Image id="2261" version="2db44eee-4524-49e7-b592-70352dd61296" parentID="1473" level="2" writerID="0" nodeType="1032" template="0" sortOrder="4" createDate="2010-09-06T09:29:11" updateDate="2010-09-06T09:45:27" nodeName="Book a table" urlName="bookatable" writerName="Administrator" nodeTypeAlias="Image" path="-1,1473,2261"><umbracoFile>/media/78133/book-a-table.gifumbracoFile><umbracoWidth>176umbracoWidth><umbracoHeight>97umbracoHeight><umbracoBytes>13235umbracoBytes><umbracoExtension>gifumbracoExtension><altText>altText>Image>

    This was the html produced rather that in the OP which was the output from Firebug.

    Well simply appending /umbracoFile returned the image. However, I don't fully understand why.Is there a config setting which would mean that I can use "/Image/umbracoFile"? It would really save me from having to change the 4.5.0 which was using that xPath.

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Sep 21, 2010 @ 18:10
    Tom Fulton
    0

    Hi David,

    I believe when 4.5.0 first came out you had to use GetMedia(.....)/Image/umbracoFile, but in 4.5.1 or 4.5.2 they fixed it so it's just GetMedia(....)/umbracoFile.  I don't remember the reasoning or exact issue though

    -Tom

  • DavidS 17 posts 38 karma points
    Sep 22, 2010 @ 11:15
    DavidS
    0

    Hi Tom,

    Thanks for getting back to me. I'll accept your answer for lack of better ones :) but I was hoping there would have been a config change I could have used so that my previous code would have worked but I guess not.

    Thanks,

    David

     

Please Sign in or register to post replies

Write your reply to:

Draft