I am migrating a 4.62B site to CMS 5 R2 with Migration Tool 220.127.116.11. 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.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)
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!
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...
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!
Hi Pedro, did you solve this issue? Just bumped in to the same problem. :(
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...