Loading...

All project content is available for reading, but you need to be a member of the project for Subversion checkout of source code, or to create/modify any information.
Login if you are a member. Apply here to request membership (open to all).

WebParts Administration Plugin

If your version 4 website is using webparts, you need this tool to help you migrate existing web parts data when migrating a site from EPiServer version 4 to EPiServer CMS 5 ( changes in the EPiServer Property architecture makes it difficult to retrieve information stored by the webparts).

Prerequisites

  • You have a migrated database (version 5 R2 or older, migrated using EPiServer Migration Tool)
  • You have your version 4 site running (same database as before running migration tool)
  • You can reach the CMS 5 database from your 4 site
  • Your CMS 5 site is running on the latest version of EPiCode.Webparts and using the PageVersionProvider (Epinova.WebParts.Providers) as default provider. Read more about new functionality in the the following blog post: Web parts and EPiServer in perfect harmony

NOTE 1! You might want to make a copy of the migrated CMS database tables; aspnet_Paths, aspnet_PersonalizationAllUsers, just in case something fails

NOTE 2! Connection strings and database names are examples and might vary.

Installation and How-to

The tool should run inside your EPiServer CMS 4 website (we need the version 4 context to de-serialize the webparts data).

  1. Download and unzip to web root of your 4 site
  2. In your 4.6 web.config ensure that default SQLProvider exists, but don't change your default provider. The provider must use a connection string that uses then newly migrated CMS 5 database(as the data we want to migrate exist here). NOTE that the applicationName may differ from database to database.
        
    <webParts>
          <personalization defaultProvider="PageDataPersonalizationProviderr">
            <providers>
              <add name="SqlPersonalizationProvider" type="System.Web.UI.WebControls.WebParts.SqlPersonalizationProvider" 
                    connectionStringName="dbEPiServerCMS" applicationName="/" />
            </providers>
    
    
  1. If your site is globalized, some pages might have data with and without the language code. Run the following query on your CMS 5 database, where x is your default/master language code.
      DELETE aspnet_PersonalizationAllUsers WHERE PathId in
        (SELECT p1.PathId FROM aspnet_paths p1 
            JOIN aspnet_paths p2 ON p1.LoweredPath + '|x' = p2.LoweredPath
            WHERE PATINDEX('%[0-9]|%', p1.LoweredPath) = 0)
    
      DELETE aspnet_paths WHERE PathId in
        (SELECT p1.PathId FROM aspnet_paths p1 
            JOIN aspnet_paths p2 ON p1.LoweredPath + '|x' = p2.LoweredPath
            WHERE PATINDEX('%[0-9]|%', p1.LoweredPath) = 0)
      GO
    
    
  1. Now its time to perform the actual migration:
    • Download and run DebugView in order to view log information
    • In your 4.6 site navigate to Admin->Tools->Web Parts Administration->Convert All (You'll se that the blob sizes are reduced by approximately 75%)
  1. If your 4.6 version uses non-standardized language codes, this needs to be corrected. (Run the following query in your CMS 5 database)
         -- OPTIONAL: Set language code also for default language as this is more consistant and requires less code (replace x with default language
         UPDATE aspnet_paths SET Path = Path + '|x', LoweredPath = LoweredPath + '|x' WHERE PATINDEX('%[0-9]|%', LoweredPath) = 0
         GO
    
         --Example of how you set languages codes to corresponding standarized ui cultures in CMS 5 version
         UPDATE aspnet_paths SET
        Path = replace(replace(replace(path, '|NO-NY', '|nn-NO'), '|NO-SE', '|se-NO'), '|EN-GB', '|en-GB'),
        LoweredPath = lower(replace(replace(replace(path, '|NO-NY', '|nn-NO'), '|NO-SE', '|se-NO'), '|EN-GB', '|en-GB'))
    
    
  1. Make sure your CMS 5 site webpart setting is something like this:
        <webParts>
          <personalization defaultProvider="PageVersionProvider">
            <providers>
              <add name="PageVersionProvider" type="Epinova.WebParts.Providers.PageVersionProvider" connectionStringName="dbEPiServerCMS"/>
    
  2. Make sure the provider has "Use language branch as part of path" set to true

Go to admin, Config, Plug-in Manager under Tool Settings - click on "Epinova.WebParts.Providers".

  1. Run your CMS 5 site and enjoy!

Download

<add the module run-time (.epimodule for installable modules or .zip for source code) as an attachment to this wiki page. Attachments can be downloaded without people needing to register on EPiCode.>

Support

Tickets for this component:

No results

Ask a question

Requires login.


Report a bug

Requires login.


Add a feature request

Requires login.


Requirements

Runtime:

  • EPiServer CMS 4.62 and CMS 5 R2
  • .NET 2.0
  • <other requirements>

If you want to change and compile the source code:

  • Visual Studio 2008 SP1
  • <if you use post-build events for deploying runtime files> Unleash IT (See PostBuildEvent for more information)

Contributed by

Steve Celius, BV Network & Thomas Leela, epinova

Attachments