Kentico / xperience-by-kentico-kentico-migration-tool

A customizable tool that migrates older Kentico solutions to the latest version of Xperience by Kentico.
MIT License
5 stars 0 forks source link

Kentico 12 MVC to Xperience by Kentico Upgrade Issue #232

Closed karthik-akqa closed 44 minutes ago

karthik-akqa commented 2 weeks ago

We are trying upgrade it from Kentico 12 to Xperience by Kentico using migration toolkit and the migration completed like below and I hope this is how it should end as I couldn’t find any reference to confirm this: issue 1

Also, I’ve attached the migration and migration protocol logs.

issue 2

After completion I logged into /admin and go to the displayed channel, the pages are not showing in the channel application, and it is showing error like below:

issue 3

Event log error:

issue 4

Migration.Toolkit.Protocol20240525_0334.log migration.toolkit-20240525.log

tkrch commented 2 weeks ago

Hi @karthik-akqa, thanks for report.

I see multiple issues: 1) users without set email exist - XbyK will not allow insertion of user without valid email email address, that prevents migration of entities that depend on that particular user (for example page created by that user, media file created by that user) this is sample of error:

2024-05-25T15:34:57.1171167+05:30 (Migration.Toolkit.Core.KX12.Handlers.MigrateUsersCommandHandler) [ERR] Command "MigrateUsersCommandHandler": failed during "insert", "UserInfo(ID=0, Guid=264fa65f-96bd-4c45-9488-332ace72c4e9 Name=dcadmin)" (62ecf731)
CMS.DataEngine.InfoObjectException: Cannot set info object, domain validation failed (Field name: Email): Enter an email address.
   at CMS.DataEngine.AbstractInfoProvider`3.ValidateSetInfoAndThrow(TInfo info)
   at CMS.DataEngine.AbstractInfoProvider`3.SetInfo(TInfo info)
   at CMS.Membership.UserInfoProvider.SetUserInfoInternal(UserInfo user)
   at CMS.Membership.UserInfoProvider.Set(UserInfo info)
   at Migration.Toolkit.Core.KX12.Handlers.MigrateUsersCommandHandler.SaveUserUsingKenticoApi(CancellationToken cancellationToken, IModelMappingResult`1 mapped, CmsUser k12User) in D:\Kentico XbK Upgrade\xperience-by-kentico-kentico-migration-tool-master\Migration.Toolkit.Core.KX12\Handlers\MigrateUsersCommandHandler.cs:line 105
2024-05-25T15:34:57.1196948+05:30 (Migration.Toolkit.Core.KX12.Handlers.MigrateUsersCommandHandler) [ERR] Command "MigrateUsersCommandHandler": failed during "insert", "UserInfo(ID=0, Guid=3b4597f5-4199-40a8-987d-e37239e31a7d Name=Mohamed.Abdullah@datacom.co.nz)" (62ecf731)
CMS.DataEngine.InfoObjectException: Cannot set info object, domain validation failed (Field name: Email): Enter an email address.
   at CMS.DataEngine.AbstractInfoProvider`3.ValidateSetInfoAndThrow(TInfo info)
   at CMS.DataEngine.AbstractInfoProvider`3.SetInfo(TInfo info)
   at CMS.Membership.UserInfoProvider.SetUserInfoInternal(UserInfo user)
   at CMS.Membership.UserInfoProvider.Set(UserInfo info)
   at Migration.Toolkit.Core.KX12.Handlers.MigrateUsersCommandHandler.SaveUserUsingKenticoApi(CancellationToken cancellationToken, IModelMappingResult`1 mapped, CmsUser k12User) in D:\Kentico XbK Upgrade\xperience-by-kentico-kentico-migration-tool-master\Migration.Toolkit.Core.KX12\Handlers\MigrateUsersCommandHandler.cs:line 105

i recommend to set valid dummy emails for those users - for example:

-- check
SELECT * FROM CMS_User
WHERE LEN(Email) < 1

-- update
UPDATE CMS_User
SET Email = CONCAT(UserName, '@dummy.localhost')
WHERE LEN(Email) < 1

2) language "en-NZ" not exists, that prevents migration of activities is there any living site language mutation with culture set to "en-NZ"? If not, clear activities with this culture or create language with LanguageName "en-NZ" before migration

3) if there are multiple documents with same DocumentUrlPath this may introduce errors, but this issue is currently under investigation in tasks #217, #215 - current workaround is to set different DocumentUrlPath (for example reset to NodeAliasPath) until correct solution is available

Let me know if suggestions helped. TK