Per Nergård
Oct 19, 2012
  3700
(1 votes)

Convert a native VPP to a versioning VPP including link conversion

This post was originally planned to be about converting a Sharepoint (SP) connect VPP to a versioning counterpart. But since a SP VPP store the links in the EPiserver database in the same way as a native provider, it works for both types.

The main reason our customer wanted to switch from the SP VPP was that it like a native provider doesn’t support permanent links.

You can read my post about the Share point connect here.

The conversion process is quite easy once you know how to do it.

And it works for both CMS5 and CMS6.

1. Get the files

First off you need to get all the files. This should be no problem since we’re talking about a native provider. If it’s a SP VPP you may need to get someone from the SharePoint side help you extracting the files. Setting showinfilemanger to false is also recommended before you start so no new documents are added during the conversion process.

2. Setup the new VPP

First we need to setup the new versioning VPP. The thing here is that the new VPP must have the same virtual name as the one we’re converting from.

So before creating the new VPP we need to change the virtualpath on the original and add a location element for that path.

Doing this will break all the current links so I did a small HttpModule to handle those requests until the conversion process is done. Download the code here.

3. Add the files to the new VPP

To add the files to the new versioning VPP I just used the drag and drop functionality which seemed to work great. Unfortunately it doesn’t work with empty folders.

If I were to do it again I would use Anders Hattestads excellent file copier which works like a charm from native to versioning. For some reason it didn’t work between a SharePoint VPP and a versioning.  You can read Anders blog post here.

Now when the files are in the versioning provider we could disable the httpmodule and all existing links will work. But if you try to change a filename you’ll see that the links still aren’t permanent so we’ll have to wait.

4. Converting the links

When it came to this part I really didn’t now how to go about it. I had a mail conversation with EPiServer support that sent me two aspx pages from the migration tool (CMS 4 to CMS5) that I could check for some input on how to build my own solution.

After reading some code I realized that the link conversion was probably done after the migration tool had updated the CMS4 database to a CMS 5 and that I therefore probably could use it for my needs.

Lucky for me it worked. Just drop the ConvertLinks.aspx in the root folder for your site and browse to it. It’s fast so just wait a minute or two and then refresh the page. If the status says completed it’s finished. If not just wait a minute longer and press refresh again until it does.

The migration tool can be downloaded from here. And after installing it you can find the .aspx file in the C:\Program Files (x86)\EPiServer\MigrationTool\SiteDeployedPages folder.

Now we can disable the httpmodule.

5. Cleaning up

Don’t forget to permanently remove the old VPP configuration and location element. And don’t forget to setup the indexingservice.config.

6. Done

Now we have successfully converted a native or SP VPP to a versioning one and the editors have never been happier.

If there are interest about it, I could do another blog post with a bit more detail about the actual steps in the deployment process. Leave a comment if that’s the case.

Oct 19, 2012

Comments

Please login to comment.
Latest blogs
Implementing EmbeddedLocalization in Optimizely CMS 12

My previous post on translation (Translating Optimizely CMS 12 UI components) gives an overview of how to implement the FileXmlLocalizationProvider...

Eric Herlitz | Jan 27, 2023 | Syndicated blog

Breaking changes in EPiServer.CMS.TinyMce 4.0.0

After upgrading to the latest version of EPiServer.CMS.TinyMce, the dropdown with formats disappears. Learn how to get it back!

Tomas Hensrud Gulla | Jan 27, 2023 | Syndicated blog

Translating Optimizely CMS 12 UI components

Optimizely CMS 12 have been out for a while now, but still some elements haven't been properly translated resulting in a GUI defaulting to english....

Eric Herlitz | Jan 26, 2023 | Syndicated blog

Image preview in Optimizely CMS12 all properties view

With these simple steps, you can now see an Image and its Metadata, including size and dimensions, when editing an Image property in Optimizely...

Tomas Hensrud Gulla | Jan 26, 2023 | Syndicated blog

Setting up the ImageEditor in Optimizely CMS 12

Setting up certain configurations on Opimizely CMS 12 differs quite a bit from prior versions of (Episerver CMS 11 and older). Here's a small guide...

Eric Herlitz | Jan 25, 2023 | Syndicated blog

Happy Hour Returning in February

Hi everyone! It's been a while and we're excited to resume our Happy Hour in February for more learning, sharing, connecting, relaxing, and just to...

Patrick Lam | Jan 24, 2023