Copied to clipboard

Flag this post as spam?

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


  • Sotiris Filippidis 261 posts 1338 karma points
    Apr 01, 2018 @ 22:16
    Sotiris Filippidis
    0

    Getting "Illegal characters in path" when importing from Image Cropper

    Hi, I've been using CMS Import PRO with the Umbraco provider, importing data from an old Umbraco installation to a new one.

    While importing from MultiNodeTreePicker properties works correctly (old media folder is specified correctly, images are being imported without issues etc), I've been facing a problem when importing from an old ImageCropper field. It's a custom data type in the old installation, so I created a custom data type with the same crops in the new installation. All I'm getting is "Illegal characters in path" exceptions.

    I created a second field with a Textarea type that accepted the contents of the old Image Cropper just to dump the JSON inside and it came up correctly.

    I then created a third field with a MultiNodeTreePicker2 and tried to import from the Image Cropper to that. Still the same error, "Illegal characters in path"

    My paths are set correctly in settings (as I mentioned, import from MNTP -> MNTP works) but it doesn't seem to want to work for Image Cropper -> anything else than a text area field. Am I doing something wrong?

    (The path I've set is /MediaImport/ and the images from the old site are in /MediaImport/Images/).

  • Richard Soeteman 3796 posts 11734 karma points MVP
    Apr 03, 2018 @ 06:31
    Richard Soeteman
    100

    Hi,

    This is propably the cause of the custom cropper in the old installation. CMSImport in the new environment expects just a relative path or relative paths as csv for the cropper datatype.

    What I would do is create a FieldProvider with prio High that extracts the filename(s) from the cropper json and return that in the FieldProvider then CMSImport can use that data to import instead of the JSON.

    Section 10.6 of the user manual descibes how to create a field provider https://soetemansoftware.nl/cmsimport/downloads

    Hope this helps,

    Richard

  • Sotiris Filippidis 261 posts 1338 karma points
    Apr 03, 2018 @ 07:37
    Sotiris Filippidis
    0

    Yes, that's probably it - the old cropper returns JSON so your proposed solution should be the way to go. I'll give it a try. Thanks!

Please Sign in or register to post replies

Write your reply to:

Draft