Copied to clipboard

Flag this post as spam?

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


  • adrianfriend 67 posts 68 karma points
    Oct 26, 2009 @ 16:16
    adrianfriend
    0

    Exporting content

    Hi All,

    Is there any easy way to export certain content into a new instance of Umbraco. I have tried to create a package with the content tree I need but when I install I get an 'Object not set' error when trying to create content. I have added all the templates & doctypes it needs aswell but still the same error.

    Is there an easier way to do this?

    Adrian

  • dandrayne 1138 posts 2262 karma points
    Oct 26, 2009 @ 16:27
    dandrayne
    0

    Creating a package should do it,so perhaps give more information about your approach to this to see if we can find out what's not working.

    Alternatively, you could have a look at umbImport after setting up a macro to create an xml file from your chosen content.

    Dan

  • adrianfriend 67 posts 68 karma points
    Oct 26, 2009 @ 16:45
    adrianfriend
    0

    Hi Dan,

    I created a new package with the content I needed and the templates/document types and tried to install it on a fresh instance of Umbraco.

    It creates the templates and doc types OK but looks like it fails when trying to add the content

    Is it because the ParentId would be different?

    [NullReferenceException: Object reference not set to an instance of an object.]
    umbraco.cms.businesslogic.Content.CreateContent(ContentType ct) +118
    umbraco.cms.businesslogic.web.Document.MakeNew(String Name, DocumentType dct, User u, Int32 ParentId) +386
    umbraco.cms.businesslogic.web.Document.Import(Int32 ParentId, User Creator, XmlElement Source) +91
    umbraco.cms.businesslogic.packager.Installer.InstallBusinessLogic(Int32 packageId, String tempDir) +4187
    umbraco.presentation.developer.packages.Installer.processInstall(String currentStep) +180
    umbraco.presentation.developer.packages.Installer.Page_Load(Object sender, EventArgs e) +334
    System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
    System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
    System.Web.UI.Control.OnLoad(EventArgs e) +99
    umbraco.BasePages.BasePage.OnLoad(EventArgs e) +15
    System.Web.UI.Control.LoadRecursive() +50

    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

  • dandrayne 1138 posts 2262 karma points
    Oct 26, 2009 @ 17:02
    dandrayne
    0

    This could be the case.  I'd try exporting from "further up the tree" and make sure you include all the required doctypes and necessary parent doctypes.  Once you've got the content in you can always move nodes around to suit.

  • adrianfriend 67 posts 68 karma points
    Oct 26, 2009 @ 17:06
    adrianfriend
    0

    Only thing up the tree is the home page! If I did export the home page do I need the homepage template and the master template?

    Adrian

  • dandrayne 1138 posts 2262 karma points
    Oct 26, 2009 @ 17:22
    dandrayne
    0

    At this stage you're basically making a carbon copy of the site? That is probably easier than going the package route and will preserve nested document types (if you're currently using any),  It's then just a case of export db, zip up files and unzip/reimport/change connection string on your new server

    Perhaps someone with more "packaging" experience could step up at this point to help out if this isn't your aim

     

     

  • adrianfriend 67 posts 68 karma points
    Oct 26, 2009 @ 17:24
    adrianfriend
    0

    Hi Dan,

    Yep that sounds like a step to far as I only need one section.

    Thanks for your help on this

    Adrian

  • adrianfriend 67 posts 68 karma points
    Oct 28, 2009 @ 18:13
    adrianfriend
    0

    Does anyone have any further ideas on this?

Please Sign in or register to post replies

Write your reply to:

Draft