To my DIComposer within public void Compose(IUmbracoBuilder builder)
So when I spin up the site - I would expect all my MediaPicker datatypes to be converted to MediaPicker3 and my Nested Content converted so everything should contine to work in Umbraco 17.
However, when I view the backoffice I get told that MediaPicker is obsolete and I should update to MediaPicker3.
And then typically - it now works.
I just commented out some code that was throwing error and moved the Deploy Migrators to the top of my Composer file. Not sure which was fixed it, maybe a combination of the two. I’m going to rerun the deployment importer again on a clean setup just to make sure I can replicate the fix.
Curious about the solution. I’m going to need to upgrade some old project that still uses Nested Content and macro’s and MediaPicker < 3 instances, so I’m curious if this is the way!
So I’ve tried a few options and this seems to be a possible.
Just testing something again to see if I can replicate the fixes.
My rough plan so for is :
Install a clean Umbraco 13 instance, install Deploy, point it at the website database, this means the database is upgraded to the latest 13 version. Export the website using Deploy via the backoffice.
Install a clean Umbraco 17 instance, point it at the website database that you’ve just updated to 13.
Install Deploy and I’ve also installed the Deploy Contrib package - which has some community migrations setup too. Not sure if I need them or not but playing safe.
Before I spin up the Umbraco 17 site, I take a DB backup just so rolling back is quick and easy.
Spin up the Umbraco 17 instance and let the migrations run, this should now mean the MediaPicker and Nested Content are all migrated and the database is in a state of 17.
Now the actually website needs to be upgraded to the same version of 17 and you need to fix all the code issues But you should be able to point it at the Umbraco 17 database and get things working.
Annoyingly, for some reason I can’t get deploy to kick in every single time. So just now I have a file called import-on-startup.zip which “should” get read by Deploy since it’s within umbraco\Deploy\ folder however, it never gets deleted / archived.
I’ve even updated the appsettings to see if that helps e.g. Enable Deploy. But nothing.
This should be a simple export / import job but it’s now taking me days to get it to work consistently.
Tomorrow I will try a clean Umbraco 16 setup and see if it’s an Umbraco 17 issue.
Looking back at your comments and stuff have you torn apart your code and put some logging in so each time it’s does a migration and fails you can get useful information
also if in doubt take it out have you tried doing each of the migrations separately to see if you can isolate it to a specific set of dst or data type
My thoughts are if you can track down the failure with logging
Eg do it with known data set of thirty media types and then see if there is as A commonality
Basically log when a migration is occurring what data type if its and guid and start
So I’ve been doing a lot of similar migrations to this recently except not using the “Deploy on startup” side of it because I found a lot of the time migrators were falling over themselves a lot trying to do Schema + Content together.
The bit of advice I was given in the past is to attempt Schema only imports first, then follow it up with a content export only after the schema only export succeeds.
Great! Thanks @TomChancer - Im actually in the middle of chunking stuff up in to small imports and doing a manual import via the “import” menu option in the backoffice. Hoping that helps
So, it looks like small chunks is the way forward and also doing it manually instead of the import-on-startup.zip
Thanks everyone for the help.
In case anyone else comes across this with similar issues -
Clean Umbraco 13 with
Umbraco.Deploy.OnPrem
Umbraco.Deploy.Contrib
Then do a manual export of just schema, then just content and make smaller zip files that way, instead of including everything in one zip, especially if you have a large site, which I do.
Then get a Clean Umbraco 17 install setup, install the Umbraco.Deploy packages on there too. Then in the backoffice, import the zip files individually. Dont forget to also setup the composer on the Umbraco 17 site too:
using Umbraco.Cms.Core.Composing;
using Umbraco.Deploy.Infrastructure.Migrators;
internal class ArtifactMigratorsComposer : IComposer
{
public void Compose(IUmbracoBuilder builder)
{
builder.DeployArtifactMigrators()
.Append<ReplaceNestedContentDataTypeArtifactMigrator>()
.Append<ReplaceMediaPickerDataTypeArtifactMigrator>();
builder.DeployPropertyTypeMigrators()
.Append<NestedContentPropertyTypeMigrator>()
.Append<MediaPickerPropertyTypeMigrator>();
}
}