Error migrating content from 3.7SP4 to 4.0RC

Posted by Community Admin on 03-Aug-2018 02:26

Error migrating content from 3.7SP4 to 4.0RC

All Replies

Posted by Community Admin on 24-Nov-2010 00:00

Hi,

I'm trying out the Sitefinity Migration Tool from CodePlex.

My Sitefinity 3.7SP4 .NET 3.5 site is multi-lingual (two languages).

I get the following error when running the migration of Pages:

Importing Pages...
Error retrieving Pages:
 
Unable to cast object of type 'Telerik.Cms.Data.CmsUrl' to type 'System.String'.   at Telerik.Sitefinity.Services.Migration.MigrationExportService.GetPagesWithParent(Guid parentId, CmsManager cmsManager, List`1 pageList) in C:\Website37SP4\MigrationExportService\MigrationExportService.cs:line 944
   at Telerik.Sitefinity.Services.Migration.MigrationExportService.GetPagesWithParent(Guid parentId, CmsManager cmsManager, List`1 pageList) in C:\Website37SP4\MigrationExportService\MigrationExportService.cs:line 973
   at Telerik.Sitefinity.Services.Migration.MigrationExportService.GetPagesWithParent(Guid parentId, CmsManager cmsManager, List`1 pageList) in C:\Website37SP4\MigrationExportService\MigrationExportService.cs:line 973
   at Telerik.Sitefinity.Services.Migration.MigrationExportService.GetPages() in C:\Website37SP4\MigrationExportService\MigrationExportService.cs:line 988
   at SyncInvokeGetPages(Object , Object[] , Object[] )
   at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
   at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)

Any idea what could be wrong?

Thanks.

Posted by Community Admin on 24-Nov-2010 00:00

Hello Michael,

Do you have several providers for CmsManager ? Inside MigrationExportService.cs the CmsManager class is create with a parameter - the provider which was also introduced in Sitefinity 3.7 SP3.

Best wishes,
Ivan Dimitrov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 24-Nov-2010 00:00

Hi Ivan,

I have only one provider for CmsManager.

I modified some code, from line 944 in MigrationExportService.cs.
foreach (CmsUrl url in page.Urls)

    mp.Urls.Add(url.Url);


Well I'm not 100% sure the code above is correct; I'm not getting the original error anymore, but I am getting a new one.
In MigrationControls.cs, line 71. ArgumentNullException.
File.WriteAllBytes(imageFileName, migrationControl.ImageData);
migrationControl.ImageData is null

Maybe it is corrupt data. There is no catch block for that exception.

Thanks,
Michael

Posted by Community Admin on 24-Nov-2010 00:00

Hello Michael,

Could you try the suggestions provided by me in this post. It looks like there is some issue with the tool. Also I assume that you have not touch the code so far, because i have upgraded 5 websites locally and none of them caused this issue. It is something specific to the page url or page structure you have.

Sincerely yours,
Ivan Dimitrov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 24-Nov-2010 00:00

Hi Ivan,

I reverted my code changes, then applied the ones in your post.

I commented the following lines:
//ExternalUrl = page.ExternalUrl,

//if (page.DefaultUrl != null)
//
//    mp.DefaultUrl = page.DefaultUrl.Url;
//    if (!String.IsNullOrEmpty(page.DefaultUrl.QueryString))
//        mp.DefaultUrl += "?" + page.DefaultUrl.QueryString;
//
//else
//
//    mp.DefaultUrl = String.Empty;
//

I'm back to my original error:

Unable to cast object of type 'Telerik.Cms.Data.CmsUrl' to type 'System.String'.

Thanks,
Michael

Posted by Community Admin on 24-Nov-2010 00:00

Hi Michael,

I do not know what the problem could be. I will need a sample project ( web.config and database backup). You can provide me with an external link or FTP through our support system. If the files are up to 20 MB you can use our system uploaded.

Greetings,
Ivan Dimitrov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed