Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After importing from 13.0.118, the widgets were imported as pages. #302

Open
FernandoMartins1970 opened this issue Nov 19, 2024 · 21 comments
Assignees

Comments

@FernandoMartins1970
Copy link

Brief bug description

Every single widget in K13, turned a page on Xperience. Is it correct? Now, I got some duplicates pages, but I realized that content is coming from a widget in a page.

Repro steps

  1. I cloned the tool in my local environment
  2. I created a empty project using CLI. Version 29.6.0
  3. I set up the appsettings.json (attached) and rebuild the tool
    appsettings.json
  4. I run this script : .\Migration.Tool.CLI.exe migrate --sites --custom-modules --users --settings-keys --page-types --pages --attachments --contact-management --forms --media-libraries --data-protection --countries --custom-tables --members --categories
  5. After this process when I open the admin site, I could the widgets in K13 as a page on Xperience. See attached screenshot.
  6. Additionally, all images save in the page types in K13 were saved without "". However, I could see this character on SQL. The Xperience log I could see many errors like this
    2024-11-14T11:52:18.5501868-05:00 (Migration.Tool.Source.Mappers.ContentItemMapper) [ERR] Error while migrating field '"OGImage"' value "
    /Project/media/Images/Image.png"
    It was imported on Xperience SQL with the same string "~/Project/media/Images/Image.png"

Expected behavior

Only show the page imported. The images not imported broken these pages as well.

Test environment

  • Platform/OS: .Net 8 Windows 11
  • Browser Chrome
  • Version 29.0.6

Screenshots

Widgets imported as pages

@tkrch
Copy link
Collaborator

tkrch commented Nov 20, 2024

Hi @FernandoMartins1970, thanks for report. Appsettings.json in description has error in it, i assume that was due to redacting connection strings/paths/etc.?

Can You send me full migration log to email [email protected] or at least version filtered to errors? (if log is large feel free to zip/rar/7z)

appsettings.json:

{
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "System": "Warning",
      "Microsoft": "Warning"
    },
    "File": {
      "LogLevel": {
        "Default": "Trace",
        "System": "Error",
        "Microsoft": "Error",
        "Microsoft.EntityFrameworkCore": "Information",
        "Migration.Toolkit": "Trace",
        "Kentico.Xperience.UMT": "Trace",
        "Migration.Toolkit.Common.Services.BulkCopy": "Trace"
      },
      // this one
      "pathFormat": "logs/migration.tool.log",
      "OutputTemplate": "{Timestamp:o} ({SourceContext}) [{Level:u3}] {Message} ({EventId:x8}){NewLine}{Exception}"
    }
  },
...

Can You post screen of old page tree vs new page tree? (difference might give me a clue)

@FernandoMartins1970
Copy link
Author

Hi @FernandoMartins1970, thanks for report. Appsettings.json in description has error in it, i assume that was due to redacting connection strings/paths/etc.?

Can You send me full migration log to email [email protected] or at least version filtered to errors? (if log is large feel free to zip/rar/7z)

appsettings.json:

{
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "System": "Warning",
      "Microsoft": "Warning"
    },
    "File": {
      "LogLevel": {
        "Default": "Trace",
        "System": "Error",
        "Microsoft": "Error",
        "Microsoft.EntityFrameworkCore": "Information",
        "Migration.Toolkit": "Trace",
        "Kentico.Xperience.UMT": "Trace",
        "Migration.Toolkit.Common.Services.BulkCopy": "Trace"
      },
      // this one
      "pathFormat": "logs/migration.tool.log",
      "OutputTemplate": "{Timestamp:o} ({SourceContext}) [{Level:u3}] {Message} ({EventId:x8}){NewLine}{Exception}"
    }
  },
...

Can You post screen of old page tree vs new page tree? (difference might give me a clue)

Hi @FernandoMartins1970, thanks for report. Appsettings.json in description has error in it, i assume that was due to redacting connection strings/paths/etc.?

Can You send me full migration log to email [email protected] or at least version filtered to errors? (if log is large feel free to zip/rar/7z)

appsettings.json:

{
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "System": "Warning",
      "Microsoft": "Warning"
    },
    "File": {
      "LogLevel": {
        "Default": "Trace",
        "System": "Error",
        "Microsoft": "Error",
        "Microsoft.EntityFrameworkCore": "Information",
        "Migration.Toolkit": "Trace",
        "Kentico.Xperience.UMT": "Trace",
        "Migration.Toolkit.Common.Services.BulkCopy": "Trace"
      },
      // this one
      "pathFormat": "logs/migration.tool.log",
      "OutputTemplate": "{Timestamp:o} ({SourceContext}) [{Level:u3}] {Message} ({EventId:x8}){NewLine}{Exception}"
    }
  },
...

Can You post screen of old page tree vs new page tree? (difference might give me a clue)

Hi @tkrch
I have sent to you the complete json and log files. I removed the credentials in Json above because had password there. I am sending here without the credentials.

{
"Logging": {
"LogLevel": {
"Default": "Information",
"System": "Warning",
"Microsoft": "Warning"
},
"File": {
"LogLevel": {
"Default": "Information",
"System": "Warning",
"Microsoft": "Warning"
},
"pathFormat": "logs/migration.tool.log",
"OutputTemplate": "{Timestamp:o} ({SourceContext}) [{Level:u3}] {Message} ({EventId:x8}){NewLine}{Exception}"
}
},
"Settings": {
"KxConnectionString": "Data Source=;Initial Catalog=13Mvc;Integrated Security=False;Persist Security Info=False;User ID=;Password=;Connect Timeout=60;Encrypt=False;Current Language=English;",
"KxCmsDirPath": "C:\Inorbital\Code\Inorbital\CMS",
"XbKDirPath": "C:\Inorbital\Code\InorbitalXbyK",
"XbKApiSettings": {
"ConnectionStrings": {
"CMSConnectionString": "Data Source=
**********;Initial Catalog=XbyK_Db;Integrated Security=True;Persist Security Info=False;Connect Timeout=60;Encrypt=False;Current Language=English;"
}
},
"MigrateOnlyMediaFileInfo": false,
"MigrateMediaToMediaLibrary": true,
"UseDeprecatedFolderPageType": false,
"CreateReusableFieldSchemaForClasses": "",
"FieldMigrations": {
"SourceDataType": "text",
"TargetDataType": "assets",
"SourceFormControl": "MediaSelectionControl",
"TargetFormComponent": "Kentico.Administration.AssetSelector",
"Actions": [ "convert to asset" ],
"FieldNameRegex": ".
"
},
"UseOmActivityNodeRelationAutofix": "AttemptFix",
"UseOmActivitySiteRelationAutofix": "AttemptFix",
"EntityConfigurations": {
"CMS_Class": {
"ExcludeCodeNames": []
},
"CMS_SettingsKey": {
"ExcludeCodeNames": []
}
},
"MemberIncludeUserSystemFields": "FirstName|MiddleName|LastName|FullName|UserPassword|PreferredCultureCode|PreferredUICultureCode|UserPrivilegeLevel|UserIsExternal|UserPasswordFormat|LastLogon|UserStartingAliasPath|UserLastModified|UserLastLogonInfo|UserIsHidden|UserIsDomain|UserHasAllowedCultures|UserMFRequired|UserMFSecret|UserMFTimestep|UserNickName|UserSignature|UserURLReferrer|UserCampaign|UserCustomData|UserRegistrationInfo|UserActivationDate|UserActivatedByUserID|UserTimeZoneID|UserAvatarID|UserGender|UserDateOfBirth|UserSettingsUserGUID|UserSettingsUserID|UserWaitingForApproval|UserDialogsConfiguration|UserDescription|UserAuthenticationGUID|UserSkype|UserIM|UserPhone|UserPosition|UserLogActivities|UserPasswordRequestHash|UserInvalidLogOnAttempts|UserInvalidLogOnAttemptsHash|UserPasswordLastChanged|UserAccountLockReason|UserShowIntroductionTile|UserDashboardApplications|UserDismissedSmartTips"
}
}

image

@FernandoMartins1970
Copy link
Author

FernandoMartins1970 commented Nov 21, 2024 via email

@tkrch
Copy link
Collaborator

tkrch commented Nov 22, 2024

Hi @FernandoMartins1970, email reached me, after log review:

i couldn't see any trace or debug entries in log (only warnings, errors, info), i have sent You update appsettings.json through email.

I highly recommend to setup Source instance API discovery

errors like this: Cannot migrate url for document '2' / node '2', source instance context is not available or set-up correctly will be solved.

Please check setting Settings.KxCmsDirPath it seems like MT fails to find images. You can check where MT search for image by log review and search for "Suggestion: If you have a backup, copy it to the filesystem on path"

With trace log i will see what is happening.

@tkrch tkrch self-assigned this Nov 25, 2024
@kentico-anthonym
Copy link
Member

Hi,

Just dropping in to comment, that the inverse of allowing pages to be transformed into widgets is a use-case I've come across previously.

@FernandoMartins1970
Copy link
Author

FernandoMartins1970 commented Nov 25, 2024 via email

@FernandoMartins1970
Copy link
Author

FernandoMartins1970 commented Nov 25, 2024 via email

@tkrch
Copy link
Collaborator

tkrch commented Nov 26, 2024

@FernandoMartins1970 email received, but i can't see any logs attached. If logfiles are too big, can you upload logfiles somewhere i can reach them?

  1. You need to configure Source instance API discovery in order to solve error Cannot migrate url for document '2' / node '2', source instance context is not available or set-up correctly will be solved. otherwise, migration tool cannot migrate full url without information loss
  2. in order to solve this error i need to know form control that was used for value input and other information stored in Trace log
  3. weird, but from trace log (when i receive it) I can see why widgets were migrated as pages

other way is to share anonymized/sanitized database and i will run migration to see what happens exactly.

@Sapphirress do we have any place where logfiles/database can be safely uploaded?

@FernandoMartins1970
Copy link
Author

FernandoMartins1970 commented Nov 26, 2024 via email

@tkrch
Copy link
Collaborator

tkrch commented Nov 26, 2024

@FernandoMartins1970 confirmed, logs in correct verbosity received

@FernandoMartins1970
Copy link
Author

FernandoMartins1970 commented Nov 26, 2024 via email

@tkrch
Copy link
Collaborator

tkrch commented Nov 26, 2024

@FernandoMartins1970 i will look into it today

@FernandoMartins1970
Copy link
Author

FernandoMartins1970 commented Nov 26, 2024 via email

@tkrch
Copy link
Collaborator

tkrch commented Nov 26, 2024

@FernandoMartins1970 i managed to successfully simulate some issue and working on fix. I will notify when fix preview is available

@FernandoMartins1970
Copy link
Author

FernandoMartins1970 commented Nov 26, 2024 via email

@tkrch tkrch mentioned this issue Nov 26, 2024
@tkrch
Copy link
Collaborator

tkrch commented Nov 27, 2024

@FernandoMartins1970 can you try migration with git branch fix/302_issues (PR #309), delete old log, record new log and send log to me? I will check if expected improvements occurred.

@FernandoMartins1970
Copy link
Author

FernandoMartins1970 commented Nov 27, 2024 via email

@tkrch
Copy link
Collaborator

tkrch commented Nov 28, 2024

Thanks for additional tests @FernandoMartins1970, i will try to continue with analysis as soon as possible.

@FernandoMartins1970
Copy link
Author

FernandoMartins1970 commented Dec 2, 2024 via email

@giorgioLUK
Copy link

@FernandoMartins1970 for further investigation we would need your backups.

Could you please share your email so I can send you instructions where/how to upload them?

Thanks!

Lukáš

@FernandoMartins1970
Copy link
Author

FernandoMartins1970 commented Dec 5, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants