I'm in the process of migrating data from an Umbraco 7 database to a new Umbraco 10.
The new installation has been built from scratch, although designed to look similar to the old version (but not identical). As such there are small differences between the Document Types, as well as other aspects. Therefore I decided on doing the migration manually by diving into the database structure of the Umbraco 7 and 10 to try and find out where they're connected.
So far I've successfully transfered (and transform, along the way) all data except for Media. All the nodes was created with the correct types, as well as any versions, be it Content or Media versions. I am 99% sure everything looks right in the database. In addition I've copied all media files to the new environment, and they appear just fine in the Umbraco backend.
However whenever I try to use any Media nodes in my Content, they simply don't show up. The site (Content) is acting as if I haven't selected a media node at all, although the backend shows it just fine.
Here's what I've managed to figure out:
If I add a new Media node, that works fine.
If I add a new Folder node, any media inside that works fine.
If I use a Media node inside of a migrated Folder node, it doesn't work.
If I move a migrated Media node into a manually-created Folder node, that also works fine.
It really feels like any Media that exists inside a migrated Folder node, is just broken somehow. Until I move it out of that Folder, of course... This all means that my migration is incomplete, because all Medias are sorted into Folders, and thus does not work.
I'm really at a loss here, I feel like I've looked everywhere and I simply cannot figure out why Media nodes inside of migrated Folder nodes, does not work.
I have also considered that it might be a file permission issue, but given that I can Move a Media node from inside a migrated Folder into a manually-created Folder and suddenly that Media node works just fine, I'm making the assumption that file permissions and ownerships aren't an issue.
I'm hoping there is an Umbraco expert out there that can point me in the right direction, thanks!
That's an interesting approach, (uSyncMigrations is pretty cool for doing this procedure)... But tantalisingly seems like you are super close to success!
My thought here is it is possibly related to 'path' or, 'parentid' or the published cache.
The path property exists for all Umbraco items in the umbracoNode table, it's a comma separated list of all the ids of all the Umbraco items above an item in the relevant tree, all the way back to -1 that represents the root of the site.
What you are describing sounds like a situation I've seen before where the path is wrong for the media item, it can be picked, but the front end doesn't render the media item, because it thinks the item is in the equivalent of the recycle bin.
I've not seen it for years, but the manner of your migration could have recreated the issue or something similar.
If you take an example of a non working media item and look at it's umbracoNode row and the path, and you move it to a new folder and it starts to work... What changes in terms of the value of the path property? Is there something different other than the parent Id change?
If this doesn't lead to a breakthrough, the other thought is that maybe all is OK, and you just need to rebuild the database nucache, which you can do from the settings section, dashboard.
As saving a moved item would update the cache...
Media did not used to be in the published cache in v7, so nothing would have gotten created there in your move around...
Thank you so much for taking your time to help me out.
I do recall when I started working on the migration I ran into issues when I didn't specify the correct path. However this one turned out to be a caching issue. While I had indeed considered it might be so, I had no idea there was controls to reset it in the backend. Thank you very much for pointing that out.
Though next time I will definitely give uSyncMigrations a thorough try before trying to do it myself.
Issue manually migrating data
I'm in the process of migrating data from an Umbraco 7 database to a new Umbraco 10.
The new installation has been built from scratch, although designed to look similar to the old version (but not identical). As such there are small differences between the Document Types, as well as other aspects. Therefore I decided on doing the migration manually by diving into the database structure of the Umbraco 7 and 10 to try and find out where they're connected.
So far I've successfully transfered (and transform, along the way) all data except for Media. All the nodes was created with the correct types, as well as any versions, be it Content or Media versions. I am 99% sure everything looks right in the database. In addition I've copied all media files to the new environment, and they appear just fine in the Umbraco backend.
However whenever I try to use any Media nodes in my Content, they simply don't show up. The site (Content) is acting as if I haven't selected a media node at all, although the backend shows it just fine.
Here's what I've managed to figure out:
It really feels like any Media that exists inside a migrated Folder node, is just broken somehow. Until I move it out of that Folder, of course... This all means that my migration is incomplete, because all Medias are sorted into Folders, and thus does not work.
I'm really at a loss here, I feel like I've looked everywhere and I simply cannot figure out why Media nodes inside of migrated Folder nodes, does not work.
I have also considered that it might be a file permission issue, but given that I can Move a Media node from inside a migrated Folder into a manually-created Folder and suddenly that Media node works just fine, I'm making the assumption that file permissions and ownerships aren't an issue.
I'm hoping there is an Umbraco expert out there that can point me in the right direction, thanks!
Hi Bjarke
That's an interesting approach, (uSyncMigrations is pretty cool for doing this procedure)... But tantalisingly seems like you are super close to success!
My thought here is it is possibly related to 'path' or, 'parentid' or the published cache.
The path property exists for all Umbraco items in the umbracoNode table, it's a comma separated list of all the ids of all the Umbraco items above an item in the relevant tree, all the way back to -1 that represents the root of the site.
What you are describing sounds like a situation I've seen before where the path is wrong for the media item, it can be picked, but the front end doesn't render the media item, because it thinks the item is in the equivalent of the recycle bin.
I've not seen it for years, but the manner of your migration could have recreated the issue or something similar.
If you take an example of a non working media item and look at it's umbracoNode row and the path, and you move it to a new folder and it starts to work... What changes in terms of the value of the path property? Is there something different other than the parent Id change?
If this doesn't lead to a breakthrough, the other thought is that maybe all is OK, and you just need to rebuild the database nucache, which you can do from the settings section, dashboard.
As saving a moved item would update the cache...
Media did not used to be in the published cache in v7, so nothing would have gotten created there in your move around...
Interested to hear if you work it out
Regards
Marc
Thank you so much for taking your time to help me out.
I do recall when I started working on the migration I ran into issues when I didn't specify the correct path. However this one turned out to be a caching issue. While I had indeed considered it might be so, I had no idea there was controls to reset it in the backend. Thank you very much for pointing that out.
Though next time I will definitely give uSyncMigrations a thorough try before trying to do it myself.
is working on a reply...