Copied to clipboard

Flag this post as spam?

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


  • Craig100 1136 posts 2523 karma points c-trib
    Jan 14, 2016 @ 15:03
    Craig100
    0

    Media Import failure

    I'm trying importing content from an old 7.1.2 site to a new 7.3.4 site with CMSImport V3.3.1 Pro. I've copied the contents of the old site's media folder into a new folder within the site root as instructed and configured the CMSImport Media Settings to suit. As a test I'm just trying to import the home page which has it's own doctype and a few image. Most of the images are embedded within RTEs, however the header image is a media picker.

    When I run the import I get:-

    Import Finished
    Import duration (h:m:s)
    00:00:00
    Records retrieved
    1
    Records imported
    0
    Errors
    1
    The following errors occured
    
    Error while importing data for property 'headerImage', datasource record @nodeName = 'Welcome', Error :/media/1315/logo-header1.jpg is not a valid int value 
    

    The set up is:-

    Confirm
    Please validate your input and press Next to import the data.
    
    Datasource options
    
    Datasource:    server=.\sqlexpress2014;database=myDB;user id=myUser;password=********
    
    Content type:    HomePage
    
    Import options:-
    
    Document location:    Welcome
    Document Type:    Home page
    Autopublish:    True
    Action when the item already exists:    Update record
    Primary key:    @id
    Enable recursive imports:    False
    
    Mapping:-
    
    nodeName:    @nodeName
    createDate:    @createDate
    publishDate:    @publishDate
    expireDate:    @expireDate
    umbracoNaviHide:    umbracoNaviHide
    column1Content:    column1Content
    column3Content:    column3Content
    headerImage:    headerImage
    column2Content:    column2Content
    metaDescription:    metaDescription
    metaKeywords:    metaKeywords
    pageTitle:    pageTitle
    

    I appear to have set up everything correctly so what could be going wrong?

    Cheers,

    Craig

  • Craig100 1136 posts 2523 karma points c-trib
    Jan 14, 2016 @ 15:40
    Craig100
    0

    Have solved this particular issue but still having problems.

    The documentation gave me the impression the contents of the old site's media folder needed to be copied into a new, separate sibling folder in the OLD site. However the new folder needs to be in the root of the NEW site and contain the whole media folder of the old site (that's the media folder itself, not just it's contents). So that has probably sorted out the headerImage.

    Now it's failing on searching for images embedded in RTEs. I changed the mappings to:-

    Confirm
    Please validate your input and press Next to import the data.
    
    Datasource options:-
    
    Datasource:    server=.\sqlexpress2014;database=myDB;user id=myUser;password=********
    Content type:    HomePage
    
    Import options: -
    Document location:     Welcome
    Document Type:     Home page
    Autopublish:     True
    Action when the item already exists:     Update record
    Primary key:     @id
    Enable recursive imports:     False
    
    Mapping:-
    
    nodeName:     @nodeName
    createDate:     @createDate
    publishDate:     @publishDate
    expireDate:     @expireDate
    umbracoNaviHide:     umbracoNaviHide
    column1Content:     column1Content
    
    Advanced settings:-
    Import Images?: True
    Import files?:  False
    Force HTML decode:  False
    
    column3Content:     column3Content
    
    Advanced settings:-
    Import Images?: True
    Import files?:  False
    Force HTML decode:  False
    
    headerImage:    headerImage
    
    Advanced settings:-
    Show error when the file is missing on disk:    False
    
    column2Content:     column2Content
    
    Advanced settings:-
    Import Images?: True
    Import files?:  False
    Force HTML decode:  False
    
    metaDescription:     metaDescription
    metaKeywords:     metaKeywords
    pageTitle:     pageTitle
    

    The error I get now is:-

    The following errors occured
    
    Error while importing data for property 'column2Content', datasource record @nodeName = 'Welcome', Error :search for images on Richtextfield: A parameter passed into a method was not a valid value Parameter name: parentId 
    

    I note that the image urls in the RTE are of the form "/media/82634/rothenburg_panoramacrop.jpg?width=483px&height=232px" and wonder if the querystring might be causing the problem?

    Craig

  • Craig100 1136 posts 2523 karma points c-trib
    Jan 15, 2016 @ 18:51
    Craig100
    0

    Have upgraded site to 7.3.5, CMSImport still errors importing images in RTE content.

    Any advice would be appreciated.

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Jan 19, 2016 @ 09:00
    Richard Soeteman
    0

    Hi Craig,

    Just tried with the querystring parameter and works over here. Is there anything more in the umbraco log file and is the complete media folder structure copied in the importmedia folder?

    Best,

    Richard

  • Craig100 1136 posts 2523 karma points c-trib
    Jan 23, 2016 @ 13:12
    Craig100
    0

    After some excellent customer service from Richard, I now have the complete content tree copied into a new Umbraco instance. It had to have a faux content/home page added to give the imported content something to reference and also a faux media/images folder in the media section for the same reason.

    The technique used was to create a content definition for the home page with child definitions for all the doctypes beneath it (down to 6 levels!). The site is RTE-heavy and so it was important to ensure that each RTE had import images and import files checked both with a target of the faux images folder. This allowed all 272 pages to be imported with all the referenced media in one hit by running the home page definition which automatically runs all it's child definitions.

    I hope to move the imported home page and tree to the root and delete the faux home page when all is complete. Not sure I can do that and maintain references with the faux media/images folder though, but that's not a big deal for this site.

    What is a big deal though is the media has been imported in such a way that each file in a media directory on disk has been imported into it's own directory on disk and reference in Umbraco. Consequently in the media tree there are many images and pdfs with (1)(1)(1) after them, even (300), and multiple copies of the same file making the media section unmanageable. The original site had 2,444 folders. That's the last thing needing to be sorted.

    Will keep you posted :)

  • Craig100 1136 posts 2523 karma points c-trib
    Feb 13, 2016 @ 02:28
    Craig100
    0

    There is an issue with pages not already being present when links in RTE's are being evaluated. If the page being linked to isn't there yet, CMSImport adds "/{localLink:0}". The only way around it I have found is to do the import all over again and the links then get filled in correctly.

    However, I'm suspecting that the images in the RTE's are being duplicated for each import run. In fact I get the distinct impression that a copy of an image is downloaded, referenced and stored in the media section for every reference to it. i.e. if a page references the exact same image (let's say "/media/1024/mypic.jpg") 10 times, then you'll get 10 images in the media section mypic.jpg (1), mypic.jpg (2), etc. I have over a thousand in my current project which I'm trying to sort out.

    I've just upgraded the site to Umbraco 7.4 and CMSImport to 3.4. So if I start again, will I still get multiple media items per run and per reference? The changelog mentions something about preventing media duplicates, but I'm not sure if it means if you rerun your import or during a single import or for multiple references on the same image.

    Sorry it's a bit long but I've spent weeks on this import and am losing it a bit. Each import run is taking 10 hours, for nearly 500 pages and 2.5K images. It's a long time to wait to find out something went wrong.

    Craig

Please Sign in or register to post replies

Write your reply to:

Draft