Copied to clipboard

Flag this post as spam?

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


  • lele 107 posts 444 karma points
    Jan 16, 2017 @ 13:24
    lele
    0

    Media Id is different than the media folder

    Hi

    I've found an issue if you importing a image from old umbraco to a new umbraco environment.

    If you have a media with the id 1234 saved in the folder for instance /media/4321 and you import the related media file from a media picker it takes the wrong picture...

    the import takes not the image with the id 1234 stored in /media/4321. the import takes the image from the folder /media/1234 with an other id for instance 2345...

    it happends that the id not matching with the folder structure ids...

    If you import with the umbraco provider you have to use the media-service method to get the right image url otherwise you 'll pick a wrong one.

    Could you please help me to fix this issue in your code?

    Thanks and best regards, Manuel

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Jan 16, 2017 @ 13:35
    Richard Soeteman
    0

    Hi,

    I am not sure what you mean, but if you say that media id's change during import that is correct This is because the new environment generates new id's A releation is stored in the table CMSImportMediaRelation.

    Best,

    Richard

  • lele 107 posts 444 karma points
    Jan 16, 2017 @ 13:42
    lele
    0

    Hi Richard

    No I don't mean the Id in the new environment.

    The media id is different than the folder Id in umbraco media folder. I think you generate the url with the media id...

    image1 with the id 1234 is stored in /media/4321/image1.jpg

    but you try to collect the image from /media/1234/image1.jpg

    but on the media folder is an other image in the folder 1234.

    I hope you understand now what I mean... :)

    Best regards, Manuel

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Jan 16, 2017 @ 13:50
    Richard Soeteman
    0

    Hi Manuel,

    No still not sure what you mean. I use the mediaservice to get the image and use the old id to get the image from the old environment.

    So you are saying that if the filename is the same it retrieves the image from the wrong folder in the source system?

    Out of the office now but will reply tomorrow.

    Best,

    Richard

  • lele 107 posts 444 karma points
    Jan 16, 2017 @ 20:15
    lele
    0

    Hi Richard

    I'm trying to find out what's going wrong... if I import a rte to rte the whole images are not showing because the images has all bad urls. the import takes completely different image paths as the source. I know you adding it as a new media at the destination media folder but the image names are not matching anymore with the folder ids...

    here an example:

    old umbraco system

    <p><img style="width: 559px; height: 372px;" src="/media/1069/studio-fotosession-333.jpg?width=559px&amp;height=372px" alt="" rel="1174" /></p>
    

    new umbraco system

    <p><img style="width: 559px; height: 372px;" src="/media/1069/studio-fotosession-333.jpg?width=559px&amp;height=372px" alt="" rel="1174" /></p>
    

    but the media id folder couldn't be the same if you adding it new on the new umbraco systems... the id should be different.

    its the blog starter kit articulate which I'm using...

    I have copied the whole media folder from the umbraco source to the destination root into the folder img and added it at the media settings node.

    maybe you have an idea what I'm doing wrong...

    thanks and best regards, Manuel

  • lele 107 posts 444 karma points
    Jan 16, 2017 @ 21:03
    lele
    0

    ok I found the rte issue. the import duplicated each time all records so I checked first time the wrong ones...

    what dosn't work is the maping of the media picker. I've got on each entry the parent folder name instead the image itself. do you know why?

    thanks and best regards, Manuel

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Jan 17, 2017 @ 07:28
    Richard Soeteman
    0

    Hi,

    You have added all images without CMSImport right? That's why cmsimport creates duplicates because CMSImport can only map images that are imported via CMSImport.

  • lele 107 posts 444 karma points
    Jan 18, 2017 @ 07:34
    lele
    0

    Hi Richard

    No I added the images with CMSImport. Is the old legacy Media Picker from Umbraco working (Umbraco 7.2.4)?

Please Sign in or register to post replies

Write your reply to:

Draft