Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
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