Copied to clipboard

Flag this post as spam?

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


  • Dan 1288 posts 3921 karma points c-trib
    Oct 17, 2012 @ 14:42
    Dan
    0

    CMSImport error: 'The relative path is not allowed here'

    Hi,

    I'm importing some data using CMSImport Pro v2.2.1, Umbraco 4.9.0.  Five of the fields on the document type are set as 'Upload' data types.  In the import source file these fields are just a string which is the path to a local image repository in which the images are located.  However, when I run the import I'm getting the following error on all upload fields:

    Error while importing data for property 'additionalImage1' :The relative virtual path 'images-to-import/pieces/piece_additional_images/Unit.jpg' is not allowed here.

    I'm sure there's a folder in the site root, called 'images-to-import', inside of which is the folder 'pieces' then 'piece_additional_images', inside of which is the Unit.jpg file.

    Could this be a permissions error - it's a standard set up through WebMatrix?  Should the media upload fields use the 'Upload' data type?

    Any advice welcome!  Thanks...

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Oct 17, 2012 @ 14:48
    Richard Soeteman
    0

    Hi Dan,

    I think Webmatrix is using a virtual folder isn't it? What happens when you access images-to-import/pieces/piece_additional_images/Unit.jpg' directly in the site?

    Thanks,

    Richard

  • Dan 1288 posts 3921 karma points c-trib
    Oct 17, 2012 @ 14:52
    Dan
    0

    If I load this directly: http://localhost:36119/images-to-import/pieces/piece_additional_images/Unit.jpg it gives me the image - so it's definitely there.  I'm sure I've done this before with WebMatrix without a hitch.  Could it be something to do with the changes to the media section in umbraco 4.9?

  • Dan 1288 posts 3921 karma points c-trib
    Oct 17, 2012 @ 14:59
    Dan
    0

    I'm looking at a previous import I did (on this same site actually, a few months ago!) and it seems I have the image property on the document type set as a media picker data-type.  I did try that initially on this import but received 'cannot convert nvarchar to int' errors on that field, so I changed the datatype from a media picker to an upload.

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Oct 17, 2012 @ 15:00
    Richard Soeteman
    0

    Could be a change in combination with webmatrix. I've tested normal IIS and 4.9 with upload field which works fine. Is it possible to use a normal IIS. I will look into this in combination with Webmatrix but can't do it right now.

    Thanks,

    Richard

  • Dan 1288 posts 3921 karma points c-trib
    Oct 17, 2012 @ 17:29
    Dan
    0

    Hi Richard,

    I get the same error with full IIS7 too.

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Oct 17, 2012 @ 17:30
    Richard Soeteman
    0

    Weird, can you post the FileSystemProviders.config file?

    Thanks,

    Richard

  • Dan 1288 posts 3921 karma points c-trib
    Oct 17, 2012 @ 17:33
    Dan
    0

    Sure:

    <?xml version="1.0"?>
    <FileSystemProviders>
    
      <!-- Media -->
      <Provider alias="media" type="Umbraco.Core.IO.PhysicalFileSystem, Umbraco.Core">
        <Parameters>
          <add key="virtualRoot" value="~/media/" />
        </Parameters>
      </Provider>
    
    </FileSystemProviders>
    

    It's using that HTML import provider you sent me a few weeks ago, by the way.  Could that be the reason?  Having said that though, I used that on this exact project to import a different set of data from an HTML table, including media, and it worked beautifully.  I can't remember though if that was under 4.8 and I've since done an upgrade to 4.9 - it's possible.

  • Dan 1288 posts 3921 karma points c-trib
    Oct 17, 2012 @ 17:56
    Dan
    0

    Perhaps I could use the HTML provider to get all other content in there, then reformat the source data and import the media items with a different provider, as an update.  Would that work, in theory?

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Oct 17, 2012 @ 18:10
    Richard Soeteman
    0

    Ah forgot the custom Adapter. Now I see what is happening images-to-import/makerimages/Waters%20%26%20Aclandpic.jpg  the %20 signs get converted somewere I think. Is it possible to send me a few images then I can have a look You have my mailo address right?

    Thanks,

    Richard

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Oct 17, 2012 @ 22:08
    Richard Soeteman
    0

    HI Dan,

    Thanks for sharing the files with me. It turns out it was a bug with the filename parser it expects filenames to start with a slash. I've fixed this and a hotfix is available for you. http://hotfix.soetemansoftware.nl/CMSImport/ and this will be included in the 2.2.2 version of CMSImport.  Download the zip file and put the dll files in your bin folder. Then try again. You will have a few errors left to fix but those images are really missing or something else is wrong with the filename.

    Hope this helps,

    Richard

  • Dan 1288 posts 3921 karma points c-trib
    Oct 18, 2012 @ 11:38
    Dan
    0

    The hotfix works great.  All sorted, thanks!

Please Sign in or register to post replies

Write your reply to:

Draft