Copied to clipboard

Flag this post as spam?

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


  • rorythecheese 110 posts 56 karma points
    Jul 20, 2012 @ 12:20
    rorythecheese
    0

    Issue with GetMedia() xml being outputted

    Hi guys,

    We’ve been having an issue with some of our media items which is affecting one of our major clients. We’ve been talking with the HQ about this but not had much success finding a solution so thought I’d throw it out to the community as I know you’re pretty damn good J

    Essentially what is happening is this:

    Sometimes our media items will basically reorder the values of the xml returned while using umbraco.library:GetMedia() switching around the url stored in umbracoFile for say the image width or image’s byte size. So this causes images to then show a broken image.

    This seems to happen at random, in that we haven’t found the trigger, and not just one but multiple images around the site all break at the same time.

    The solution for the moment is to find the image in the media library and re-save it. This is ok to patch it for now but we really need to find out the cause to fix it forever!

     

    If you look in the database the media has saved correctly in the cmsPropertyData table in that broken image are working images all share the same order and propertytypeid as each other.

    It’s when you look in the cmsContentXml table for the same images when you see that it’s all been save weirdly - this seems to be what is outputted when using GetMedia()

    Broken image:

    <Image id="6188" version="d8679647-4689-40b6-9f8f-520a4bfaedcd" parentID="1142" level="4" writerID="8" nodeType="1032" template="0" sortOrder="14" createDate="2011-10-14T16:14:00" updateDate="2012-04-23T17:44:45"  nodeName="London_Colney" urlName="london_colney" writerName="Tom Digby"  nodeTypeAlias="Image" path="-1,1086,1141,1142,3309">
        <umbracoFile>940</umbracoFile>
        <umbracoFile>320</umbracoFile>
        <umbracoWidth>56230</umbracoWidth>
        <umbracoBytes>jpg</umbracoBytes>
        <umbracoExtension>cost of production sddg</umbracoExtension>
    </Image>
    

    Working image:

    <Image id="6794" version="421f6031-ee35-442b-b61f-6aea0d54c7c4" parentID="3302" level="5" writerID="16" nodeType="1032" template="0" sortOrder="23"      createDate="2012-06-07T12:55:20" updateDate="2012-06-07T12:55:20"  nodeName="Q1 Jubilee" urlName="q1jubilee" writerName="Tom Mills Webb"    nodeTypeAlias="Image" path="-1,1086,1109,1126,3302,6794">
        <umbracoFile>/media/649913/sainsbury_s_diamond_jubilee_table_wear2.jpg</umbracoFile>
        <umbracoWidth>940</umbracoWidth>
        <umbracoHeight>320</umbracoHeight>
        <umbracoBytes>98727</umbracoBytes>
        <umbracoExtension>jpg</umbracoExtension>
    </Image>

     

    As you can see we have 2 umbracoFile nodes in the first example and neither showing the path to the image. Infact it seems like they’ve shifted along 1 place when being generated.

    And with this we’re stumped.

    We are using umbraco v4.7.1.1 which was upgraded from v4.7. It’s running on a dedicated server which is the same setup as all our other one and no other site has this problem.

    We have the following packages installed

    • FALM Housekeeping
    • FamFamFam Icon Package
    • Relation Types
    • XSLTouch
    • UComment
    • ImageGen
    • Umbraco Contour
    • Umbraco Courier
    • Cmsimport

    If anyone’s got any ideas for further investigation or have seen this issue before please let us know we would be most grateful.

    Cheers.

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Jul 21, 2012 @ 18:02
    Jeroen Breuer
    0

    I've once had a situation where nodes got corrupted in a similar way. It was because multiple people were working on the same content node and saved it at the same time. The solution was the same so by saving the corrupted node again it was fixed. Could that be the trigger?

    Jeroen

Please Sign in or register to post replies

Write your reply to:

Draft