-
Notifications
You must be signed in to change notification settings - Fork 5
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
Error when rerunning a migration for a type that uses a reusable schema #320
Comments
Just to add, the names of content items seem to be changing for each migration. I believe it's due to the "GetSafeCodename" method that generates random characters. Changing the method to return a calculated \ consistent value would allow us to get the same results on multiple runs. |
Hello Sandro, Thanks for letting us know. Our team will investigate this, and we will fix it if it is a bug. The estimated time for delivery is the 2nd or 3rd week in January 2025. |
Thank you, @DavidSlavik! Just in case it helps, I wanted show you a couple more things I noticed as I was working on a migration project. When running a migration for the second time and then generating CI files, content types that have a custom mapping class seem to get a second copy of their reusable schemas: For types that do not have a custom mapping class, these ID and GUID values change: For both mapped and non-mapped types, the "Category_Legacy" values get duplicated: Please let me know if I can help with the investigation in any other way. I'd be happy to provide a copy of the code and database if it would be helpful. |
Hi @twozero6 , The changing content item names are not treated - they shouldn't be an issue for the primary problem and changing it would require deeper cuts into the migration tool. However if you conclude that they are a problem, let us know. |
Hi @twozero6 , |
Thank you @akfakmot . We are exited to try this, and are planning to test it on a migration Monday, Jan 13. |
@akfakmot @bluemodus-mwills this seems to have resolved the issue I was encountering. The pages in the web channel are loading after running the migration two times. The categories are still being duplicated but it doesn't seem to be breaking the page. @akfakmot should I create a separate issue for the categories? |
@twozero6 Thanks for testing it. Since categories were also part of the subject of this task, let's solve it within this task before we close. I will try to reproduce once again and get back to you. If it cannot be reproduced on my side, I may need to ask you for further specifics. Let me get back to you. |
Thank you @akfakmot ! |
Hiya @akfakmot , is there an ETA for this issue? Thank you! |
Hi @bluemodus-mwills, I tested yesterday with negative result. Although I still have a few scenarios to try on my side today, it would speed us up if you could share the migration data and code as offered by @twozero6 Thanks a lot |
@bluemodus-mwills @twozero6 Thanks. I have the files now. Thanks and I'll be resolving this and the other issues until end of this week. |
@twozero6 Unfortunately there's some problem when importing the bacpac. Can I ask you to provide a plain .bak of the xbyk database and include also .bak of the source database? Thank you |
@akfakmot I uploaded both .bak files to the same location, let me know if you have any trouble with them. Thank you. |
@twozero6 Thank you very much. The backup was successfully restored to my server. This is a big help. |
Hi @twozero6 , regarding the duplicate categories caused by repeated migration, this should now be fixed in newest Migration Tool release v2.1.0 |
Thank you, @akfakmot ! |
Thank you @akfakmot! |
@twozero6 from what I saw in my testing, this seems to have resolved our issue, but I plan to do more work with this next week and I can confirm then. Thank you! |
When working with any significant migration we need the ability to rerun the migration, just like we can without using custom class mappings, or when using UMT. It enables fixing issues and rerunning it without having to start over.
Furthermore, without this, there's no chance we could migrate delta content changes, even if we used the approach of rerunning in an empty database, serialize to CI, and merging CI changes.
It gives us the impression that there's a case where
Guid.NewGuid()
is being used when migrating content like maybe here. But, it would be better to require us to provide a static Guid -- one that would be the same with every migration runs.This issue is a significant hinderance to using one of the most powerful features -- custom class mapping.
I have a custom ClassMapping class for several page\content types. Those types have multiple reusable schemas as well as standalone fields.
After I run the migration for the first time, the pages of those types work fine in the content tree.
After I run the migration for the second time, the pages show "Something went wrong!" with this error in the Event Log:
An unhandled exception has occurred while executing the request.
Message: An item with the same key has already been added. Key: ReusablePageTitle
Every field in the mapping class for the Reusable Schemas and every field in the Types using those schemas have a unique but static GUID assigned to them. The types themselves also have a unique but static GUID.
The text was updated successfully, but these errors were encountered: