Open JMMM77 opened 1 year ago
Hi,
did you have template pages (e.g things in views folder?)
Templates can only be added to doctypes in umbraco when the file exists (its bit of a pain but the way it works).
so if you don't have any views in the views folder (and why would you its a migration). then the template wont get set.
I have been considering adding placeholder .cshtml files pre import as this would at least put the template there - but that probably explains why they are not set post migration.
Hi Kevin,
Thanks for your reply, I doubled checked and confirmed that the views folder did contain the template , please see view folder below, for the StandardContentPage. The strange thing is that the migration is working for some pages but not others. I also noticed that if the tabs in document types had symbols in them that their properties would not be migrated. I got over this by removing the symbols from the tabs in the def.config before running the migration.
Is there a way that I can see the uSync logs to see why it failed to set a template?
Please let me know if there are any issues, otherwise great tool :)
Hi,
did you have template pages (e.g things in views folder?)
Templates can only be added to doctypes in umbraco when the file exists (its bit of a pain but the way it works).
so if you don't have any views in the views folder (and why would you its a migration). then the template wont get set.
I have been considering adding placeholder .cshtml files pre import as this would at least put the template there - but that probably explains why they are not set post migration.
I've been playing with uSync.Migrations yesterday and found this same issue, but no templates have been created (I did not copy/paste the views into the new solution as wasn't aware this was a required step.
@KevinJump If it's simply a case of copying the template files to the Views folder before running the migration, simply adding this step to the documentation would be helpful and I think sufficient. I'm happy to update this but wanted to check this is the intended process first.
Thanks
Yes - its a complicated one, because those templates are almost certainly going to require some work as your migrate over to .net core.
But I think creating a template file if there isn't one in already there might make sense- that way you can do either, copy over pre-migration or have blank ones made for you.
the packers (Umbraco 7/8 zip file things) do capture the views folders - so if people have used that (and the migration has a Sites folder) we can could also use that folder as the source (again if the file isn't there before the migration starts).
I dug into the uSync/migrate/v8
folder and could see it output the Templates folder with expected .config files. I copied my views across, re-ran the migration and it generated the missing templates for my doc types.
I would think that if a doc type has a Template you're always going to want that template reference in the backoffice/associated to the doc type so I would suggest they should always be created. If someone wants to copy the Views across before the migration becuase it helps them migrate the framework code then fine, otherwise create a blank View, because as you say, it's always going to need migrating to .net core.
When I ran the Migrations I saw that some of the Document Types were missing their Templates. For example, I have a "Standard Content Page" Document Type that is supposed to Allow the "StandardContentPage" Template, but it has not after the migration. But the Template for the Home Page and Contact Us page did keep their document types.
I checked the data folders to see the difference between them but could not spot any obvious differences.
ContactUs.config Template
StandardContentPage.config Template
Contact Us def.config Document Type
Standard Content Page dev.config Document Type
Umbraco 7
Umbraco 10