Copied to clipboard

Flag this post as spam?

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


  • Sam 3 posts 84 karma points
    May 05, 2023 @ 13:22
    Sam
    0

    Media entities not available after migrating from v8

    Hi, I've recently migrated from v8 to v9 then v10 in one big update. Issue I am getting is with media files, new ones uploaded work fine, they seem to have the same property values within the model that's coming down.

    This one is working and is a new image

    "backgroundImage": "umb://media/4966f63391694c24b7fc11e9a85cf181"

    However this old migrated image is not

    "backgroundImage": "umb://media/e04015a24b164d51bd7f753e372bcc4f"

    Using the code:

    var backgroundImage = Model.Value<IPublishedContent>("backgroundImage");
    <div class="image" style="background-image: url('@backgroundImage.Url()');"></div>
    

    Works for the top image but not the bottom one. The migrated image returns null so I'd guess that the umbraco id isn't matching up to anything?

    I can see both the images in the media tab and they are both displaying there and seemingly available to use.

    Is there anywhere in the database that is storing these ids? I've tried having a skim through to see if I could find anything linking the Uid and the actual image but not found anything so far on it. We've got 6k files in media so looking to avoid reuploading them all.

    Any help appreciated, thanks in advance :)

  • Marc Goodson 2148 posts 14352 karma points MVP 8x c-trib
    May 06, 2023 @ 12:39
    Marc Goodson
    100

    Hi Sam

    It feels like your migrated media is there in the database but not in the published cache?

    If you find one that is not appearing, and 'resave' the media item in the backoffice, does that then make it work?

    (if so it's the backoffice action is forcing it into the published cache)

    If this fixes it then, rebuilding the cache from the settings dashboard, might, if you are lucky, save the day!

    regards

    Marc

  • Sam 3 posts 84 karma points
    May 08, 2023 @ 18:45
    Sam
    1

    Hi Marc,

    Thank you so much, reloading the memory cache sorted it. Really saved the day for me on that one, much appreciated!

    Regards,

    Sam

Please Sign in or register to post replies

Write your reply to:

Draft