+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Start fresh with SF 5.4, but bring published content from SF 5.1 w/o upgrading.

Start fresh with SF 5.4, but bring published content from SF 5.1 w/o upgrading.

4 posts, 0 answered
  1. gregory hernandez
    gregory hernandez avatar
    59 posts
    Registered:
    10 Jul 2009
    21 Feb 2013
    Link to this post

    Marko asks a great question (http://www.sitefinity.com/developer-network/forums/general-discussions-/best-practices-for-continuous-development-and-deployment-of-an-existing-site) for which I am look forward to the answers he gets.

    Now, I have a question that, along with his, would complete the picture for my situation.

    I started a website back on Sitefinity 4.2 and have upgraded it since, up to version 5.1.

    Instead of just continuing to upgrade the website up to version 5.4, I'd like to start with a completely fresh Sitefinity 5.4 website.

    Then, I'd like to bring into my fresh Sitefinity 5.4 website only the published content (and users, taxonomy, etc.) from my Sitefinity 5.1 website.

    Why not just upgrade you ask?

    For one, I would eliminate those extra files Marko mentions in his question.

    Also, I'd like to get rid of some of the fixes (code, files) that I needed to develop along the upgrade way to fix issues with Sitefinity, which I understand have been fixed by now out of the box.

    Any guidance on with this would be greatly appreciated.

  2. Victor Velev
    Victor Velev avatar
    1345 posts
    Registered:
    06 Jul 2015
    26 Feb 2013
    Link to this post
    Hello Gregory,

    If you do not wish to upgrade to 5.4 your current website, but still move all your content items to it, you have an option, however it is not an easy one. Since Sitefinity does not have such migration tool between 4x and 5x sites, you will need to create custom providers for each one content modules. Then using our API and the managers, you can access the items from the other providers. After you have access to those items, you can create a foreach loop, in which you can create the same items in your default provider for the current site, thus importing and exporting the content from the different providers.

    Here is a quick sample, if you want to sync dynamic module's data.

    First the module builder types have to be added to the new project as additional providers. Add connection string from one project to the other from Administration->Settings->Advanced->Data->Connection string (follow the pattern of the already exisinng connection string), name the connection string. This way now the new project is connected to the old.
    In Administration->Settings->Advanced->DynamicModules->Providers add new provider to the default one of the same type OpenAccessDynamicModuleProvider and add two parameters.

    applicationName /DynamicModule
    connectionString =  the name of the connection string to the old database created previously.
    Restart the application and the new provider will appear.

    Query the old provider data and create new one in the current project:

    DynamicModuleManager dynamicModuleManagerOld = DynamicModuleManager.GetManager("MyOldProvider");
               Type testTypeOld = TypeResolutionService.ResolveType("Telerik.Sitefinity.DynamicTypes.Model.TestOld.Test");
               var queryOldItems = dynamicModuleManagerOld.GetDataItems(testTypeOld).ToList();
       
               foreach (var item in queryOldItems)
               {
                   DynamicModuleManager dynamicModuleManager = DynamicModuleManager.GetManager();
                   Type testType = TypeResolutionService.ResolveType("Telerik.Sitefinity.DynamicTypes.Model.Test.Test");
                   var testItem = dynamicModuleManager.CreateDataItem(testType);
       
                   testItem.SetValue("Title", item.GetValue("Title"));
       
                   testItem.SetString("UrlName", item.GetValue("UrlName").ToString());
                     
                   dynamicModuleManager.SaveChanges();
               }

    All the best,
    Victor Velev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    27 Feb 2013 in reply to Victor Velev
    Link to this post

    @gregory

    I feel your pain, I REALLLLY REALLLLY do...I've wanted to do the same thing no less than 3 times.  You feel like your content isn't "right" compared to a new instance after all the hacks and scripts. 

    My personal blog was so borked from the initial unsupported 3.x migration module that I just literally copy\pasted it all to a new instance by hand.

    I wish such a tool existed, because us older early adopters also can't take advantage of the sequential GUIDs :/

    I'd even be happy with a tool that migrated over just the users and content into the "Default" providers as if they were created native...then I could just re-create the pages.

    Steve

  4. Victor Velev
    Victor Velev avatar
    1345 posts
    Registered:
    06 Jul 2015
    04 Mar 2013
    Link to this post
    Hi guys,

    I wanted to follow up on this:  since such functionality does not exist out - of - the - box I have logged a feature request in PITS, which you can track and vote for.

    Greetings,
    Victor Velev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
4 posts, 0 answered