Copied to clipboard

Flag this post as spam?

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


  • Allan Haugsted 14 posts 104 karma points
    May 18, 2019 @ 11:15
    Allan Haugsted
    0

    uSync 8 media import fails

    Hi

    I'm currently migrating a website to Umbraco 8 from version 7.5.4. So far so good. But while attempting to move the Media library, using uSync 8. Images simply will not import.

    I have installed uSync 8 from the packages tab in Umbraco, and it appears to be functioning as expected.

    As a test, I have copied a folder from the old media folder (containing two files): /media/1001/mancat.jpg /media/1001/mancat_thumb.jpg

    And placed them in the new umbraco solution: /uSync/v8/Media/1001/mancat.jpg /uSync/v8/Media/1001/mancat_thumb.jpg

    Running an import discovers the files, however two errors are reported. Both states: IMedia, man_cat.jpg, Failed to load: Invalid character in the given encoding. Line 1 position 1

    In the log file it says: "@mt":"Error loading file: PATH\Web\uSync\v8\Media\1001\man_cat.jpg [Invalid character in the given encoding. Line 1, position 1.]"

    Have anyone encountered this or am I just doing it wrong?

    /Allan

  • Kevin Jump 2310 posts 14695 karma points MVP 7x c-trib
    May 20, 2019 @ 10:33
    Kevin Jump
    0

    HI Allan,

    uSync doesn't fully support migrating from v7 to v8 (quite a bit of underlying stuff has changed - plus there is a rumor of a core upgrade tool)

    but from the sounds of it, you are coping over the media folder from a Umbraco 7 install to the v8 one, in v8 (and its the default in later versions of usync on v7) the media folder isn't included within the uSync folder, you should only need a copy of the actual media folder from Umbraco.

    for usync8 - the media folder within uSync contains the config of a media item (so extra settings, internal keys etc) but not the actual media as that is held in the media folder.

    for info: https://our.umbraco.com/documentation/Umbraco8FAQ#will-it-be-possible-to-upgrade-automatically-from-umbraco-7-to-umbraco-8

  • Allan Haugsted 14 posts 104 karma points
    May 20, 2019 @ 19:14
    Allan Haugsted
    0

    Hi Kevin

    I see when I export media from an older umbraco installation (like 7.5.4) it serializes both the id AND guid. But when I do the same from umbraco 8, with usync 8, it only serializes guid as key.

    I'm curious, because I was under the impression that when I link from content to a media, it's the Id and not the guid being used? At least all my media, which I have managed to migrate from 7.5.4 to 8 is working (when viewed in the media library) and have the same guid, but id have changed. So when I transfer content using packages, I get installdata errors

    Is that intended?

  • Kevin Jump 2310 posts 14695 karma points MVP 7x c-trib
    May 20, 2019 @ 19:50
    Kevin Jump
    0

    Hi Allan,

    Yes in Umbraco 8 everything is linked via GUIDs no more ID based linking :). (This is sort of true from Umbraco 7.6 onwards which has both Id and guid depending on controls used)

    As you can't set the ID we don't serialise it, one less thing to ignore when we are comparing import files with installed setup.

    Kevkn

  • Allan Haugsted 14 posts 104 karma points
    May 20, 2019 @ 19:56
    Allan Haugsted
    0

    Hi

    So now I'm thinking, what's the best way to get the site content from 7.5.4 to 8? I have moved all developer/settings stuff using packages and re-written the xml for the media library, which seems to work also, focal points, crops and all.

    I have serialized the entire site content in 7.5.4, but now it looks like, the xml for that, is also completely changed. I also noticed that in the serialized data, the references are by guid, so thats great.

    How many content.config root element-types (menuLink etc...) exist, should I manually change the xml for the content, to match the new structure?

  • Allan Haugsted 14 posts 104 karma points
    May 20, 2019 @ 10:59
    Allan Haugsted
    0

    Hi Kevin

    Yeah I can tell from looking through the code of uSync8, that the changes are as fundamental as some of the changes I have made to my own code while migrating the website.

    I have chosen to not sit on my hands, and code myself out of the problem. Writing a small console application which I point to my exported *.config in the old format, which is then re-written to the new xml format that usync uses. That was easier than trying to make usync8 do what I want (because I started that way, including the source as project references). Those files are then the files I move to the v8/media folder of the new site. While the images themselves are copied to ~/media.

    It's 4000 config files, it took less than an hour to write and five seconds to execute, and it appears to be working (debugging as we speak).

Please Sign in or register to post replies

Write your reply to:

Draft