Copied to clipboard

Flag this post as spam?

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


  • Dave Pearcey 46 posts 178 karma points
    Mar 08, 2017 @ 15:26
    Dave Pearcey
    0

    CMS Import - Importing content from another Umbraco Installation

    Hi,

    I've recently taken over a project and in all honestly it's terribly structured, especially for what the client wants me to create for them.

    I'm rebuilding the old 7.0.3 project and am currently trying to import all the articles, members etc.

    both websites are using SQL Server to store Umbraco's data.

    What I'm failing with right now is trying to grab all the articles and just putting the bodyText field into my new documentType.

    Using the Query:

    SELECT *
    FROM cmsPropertyData pd
    INNER JOIN cmsPropertyType pt
        ON pt.id = pd.propertytypeid
    INNER JOIN cmsContent c
        ON c.nodeId = pd.contentNodeId
    INNER JOIN cmsContentType ct
        ON ct.nodeId = c.contentType
    WHERE ct.alias = 'ArticleDetails' AND pt.Alias = 'bodyText'
    

    in SSMS, it does grab the exact data i need. But when i try to use the same query in CMSImport i get:

    "Error during load, check the logfile for details id "

    log:

     2017-03-08 15:06:22,680 [P19968/D19/T23] ERROR CMSImport.Controls.CMSImport - CMSImport:Error during load of wizard
    System.Data.DuplicateNameException: id
       at CMSImport.Extensions.Providers.DataProviders.DataProvider.GetColumnNames()
       at CMSImport.Extensions.Providers.DataProviders.DataProvider.get_Columns()
       at CMSImportLibrary.Providers.ImportProviders.Content.ContentImportProviderForm.Initialize(ImportState state)
       at CMSImport.Controls.CMSImport.(Int32)
       at CMSImport.Controls.CMSImport.OnPreRender(EventArgs e)
    

    It does take about 2 seconds before coming up with the error. An initial thought being that it could have been timing out since there are 31,906 posts. But my gut tells me its my query that's incorrect for what CMS Import needs.

    Is anyone able to point me in the right direction?

    Exporting the content as a package from the site is not an option either.

  • Dave Pearcey 46 posts 178 karma points
    Mar 08, 2017 @ 15:40
    Dave Pearcey
    0

    Sorry to double post AND to answer my own question before i've been even been approved to use the forum, but the issue was caused by there being multiple ID columns (as suggested in the error), due to the joins. So i just changed my query to only get pd.dataNtext rather than *

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Mar 09, 2017 @ 07:48
    Richard Soeteman
    100

    Nice query you have there, did you also find the Umbraco Import provider? http://soetemansoftware.nl/cmsimport/downloads

    That is specially meant for this task.

    Best,

    Richard

  • Dave Pearcey 46 posts 178 karma points
    Mar 14, 2017 @ 09:28
    Dave Pearcey
    0

    Sorry for the late reply Richard, but that was a fantastic bit of input. Saved me figuring the rest of the query out in order to import it the way i wanted to. Thank you.

Please Sign in or register to post replies

Write your reply to:

Draft