Migration issue - missing parameters?



I am migrating a 4.62B site to CMS 5 R2 with Migration Tool The migration is almost completed (migrating links is finished) but just at the end when migrating Page Types I get the following error message:

[2009-11-18 15:22:47][Information] Finished migrating links

[2009-11-18 15:22:49][Error] Migration terminated with error:

[2009-11-18 15:22:49][Error] System.ArgumentOutOfRangeException: startIndex cannot be larger than length of string.

Parameter name: startIndex

   at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)

   at EPiServer.Migration.TemplateFiles.MissingTemplateFileCreator.GetRelevantPageTypeFiles(String epi4Path)

   at EPiServer.Migration.TemplateFiles.MissingTemplateFileCreator.CreateMissingTemplateFiles(MigrationContext migrationContext)

   at EPiServer.Migration.MigrationWorkflow.CreateMissingTemplateFiles(Object sender, EventArgs e)

   at System.Workflow.ComponentModel.Activity.RaiseEvent(DependencyProperty dependencyEvent, Object sender, EventArgs e)

   at EPiServer.Migration.MigrationStepActivity.ExecuteHandler(Object sender, EventArgs e)

   at System.Workflow.ComponentModel.Activity.RaiseEvent(DependencyProperty dependencyEvent, Object sender, EventArgs e)

   at System.Workflow.Activities.CodeActivity.Execute(ActivityExecutionContext executionContext)

   at System.Workflow.ComponentModel.ActivityExecutor`1.Execute(T activity, ActivityExecutionContext executionContext)

   at System.Workflow.ComponentModel.ActivityExecutor`1.Execute(Activity activity, ActivityExecutionContext executionContext)

   at System.Workflow.ComponentModel.ActivityExecutorOperation.Run(IWorkflowCoreRuntime workflowCoreRuntime)

   at System.Workflow.Runtime.Scheduler.Run()


The problem is function GetRelevantPageTypeFiles in the Migration Tool. If I take a look in Reflector it seems like it is calling function “ListPageTypePaths()” which maybe is returning a list with (some) empty strings. When after that GetRelevantPageTypeFiles tries to make a “Substring(2)” in one of those strings that causes the error above.

I have compared web.config in the 4.62 site with several different successful migrations I made before at other customers and I do not see differences, but it seems like I am missing some additional parameter there? Anybody with a different approach?

Thanks in advance!

Nov 20, 2009 8:45

Could it be that you have pagetypes with no paths the the actual template files(aspx)?

I don't really have a clue to this issue, it just struck me as an option based on the name on the functions you are mentioning...


Nov 20, 2009 9:54

Thanks for your answer, Morten!

The paths are ok but I am actually wondering what happens if I remove all page types in 4.62B, run migration tool and then see if indexing of versioning filesystem is reached…

If this error sounds familiar to anybody all feedback is more than welcome!


Nov 23, 2009 9:01

Hi Pedro, did you solve this issue? Just bumped in to the same problem. :(


Nov 30, 2009 11:49

Hello Erik!

Actually not, our customer right now is running acceptance testing and we are not changing anything under the ongoing process. The only (ugly) solution I can think is to export all the page types in 4.62B, delete them, run the migration tool and import those page types in CMS5 afterwards, but I have not tested myself (hopefully in a couple of weeks) and I am not sure if it can solve the problem...


Nov 30, 2009 16:57


Our problem is now solved and it was so stupid as two "dummy" templates which were used as separators in admin interface (e.g. "<b><font color=red>Old templates</font></b>" in the name field and all the other fields empty), these were the villain of the piece. After deleting them the migration was working fine.
At the same time there were templates in admin which did not have correspondence in the project as source code, probably these could do the migration malfunction too.
Dec 18, 2009 9:19
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.