Copied to clipboard

Flag this post as spam?

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


  • Mihir Ajmera 32 posts 145 karma points
    Oct 03, 2019 @ 07:01
    Mihir Ajmera
    1

    String "8842" is not a valid udi. for media picker in Umbraco 8.1.4 content migration issues in template

    Hello All,

    I do the content migration from Umbraco version 7.14.0 to 8.1.4. all content migration successfully in the back office of all media picker images.

    Now I start to develop on the front-end side and try to get a media picker image from the back end content so I got the below type of Error.

    MediaPickerImageError

    After I remove the migration media picker image and add same image again then it work fine.

    After doing debugging my code then I identify that Umbraco 8+ version support only UDI format(umb://media/c33bfe07a82b4df18a79db154139cb91) which in my case save media id as the original value which not save as above format so it gives me an error.

    Currently, I have a 5600+ image available in the media folder If I do a manual process of remove images and add images again it takes lots of time which is not possible in my case.

    So if you have any idea about to execute script in the database side and directly convert media ID into UDI format that better for me.

    Thanks in Advance

  • Steve Megson 151 posts 1022 karma points MVP c-trib
    Oct 03, 2019 @ 13:24
    Steve Megson
    100

    As far as I know, the migration should have failed if you're using any of the obsolete pickers that store integer IDs rather than UDIs.

    Would the properties have originally been created before version 7.6, and then later been changed to use the UDI-based pickers? That would leave a mixture of integer and UDI values in the database, which I don't think the migration would expect.

    The easiest fix for the front-end error is probably to add a modified version of MediaPickerValueConverter to your project, with the ConvertSourceToIntermediate method changed to deal with both types of ID. I could have a look at writing something like that if you want to go that way.

    I'm not sure how the backoffice will handle editing media pickers with integer IDs selected. I think you'll be OK with single pickers, but multiple pickers might have problems.

  • Punit Sharma 27 posts 96 karma points
    Dec 05, 2023 @ 05:49
Please Sign in or register to post replies

Write your reply to:

Draft