World is now on Opti ID! Learn more
AI OnAI Off
World is now on Opti ID! Learn more
Thanks for sharing your finding & solution, and apologies for the inconvenience it has caused. I will file a bug for this
I saw there was already a reported post about this initialization module but I think the problem I got is slightly different. This other report is found here: https://world.optimizely.com/forum/developer-forum/Problems-and-bugs/Thread-Container/2024/8/episerver-forms-5-7-2-and-newer-crashes-on-initialization/
My stacktrace was:
In MigrationService.cs the code is iterating all upload asset folder owned by a content that inherits IFileUploadElementBlock by checking ContentOwnerID.
However the if statement uses IContentRepository.Get instead of IContentRepository.TryGet and in my case the owner content must have been deleted because this is where the code throws exception.
The fix for this is pretty simple thought. I created my own version of MigrationService.cs
And then forwarded the original service to my own in Startup.cs