What files to copy from old website to clean install?
Hi,
I want to clone an existing Umbraco website.
I have created a new solution in VS2017 and using Nuget installed a clean instance of Umbraco using the same version as the original and using the Umbraco installation wizard connected it to the original database. I just want to be absolutely sure I know which files/folders to copy across from the original installation and when to overwrite files in the new installation and when not to. I've had a couple of fails at this already so I just want to double-check.
Can anyone help with advice? I'd be most grateful.
This is off top-of-my-head, so don't take it as gospel:
/Views/
/App_Plugins/
/Media/
If the original site uses NuGet for any packages then you'll need to re-install those. Likewise, if it uses standard Umbraco packages then re-install those. You may also have some other non-Umbraco DLLs in the /bin/ folder, so check for those.
I'd also recommend using a good Diff tool, like Beyond Compare, to check for other changes. I would compare all config files (ie. web.config and /config/*) for changes. Generally I'd merge in changes from the old files into the new, as you want to keep the newest format, but with existing values (by and large).
You will also need to add any CSS files, static images, JavaScript etc. from the original site.
Thanks for the reply. As it happens, just before your reply I had tried using WinMerge to compare the two installations and had copied over everything that the new installation didn't have, and then merged the original web.config with the new web.config.
I'm regretting that already, as when I open default.aspx in my browser I get the YSOD with this error
That sounds like you're nearly there. Can you get into the backend and republish all content (right click on the content label at the top of the tree).
Clear all the examine files and umbraco.config files in the app_data and try restarting the solution. Then if it's still happening look at the error log and see if you can narrow it down to certain lines in the template causing issues (most likely around image / content pickers).
Line 56: <header id="header">
Line 57: @if (CurrentPage.HasValue("aboveLogo")){
Line 58: <h2 class="abovelogo">@Umbraco.Field("aboveLogo", recursive: true)</h2> }
Line 59: <div class="logo">
Line 60: <div>
EDIT: ...and if I fill that text field on the Home page the error disappears, and a new 'is not a valid udi' pops up. So this is happening where I have bits of code that test to see if a field is populated and if it is then it inserts the field but if it isn't it ignores it. The code works on the original site. Why doesn't it work here, do you think?
Couldn't find that property in web.config but it was in umbracoSettings.config. When I changed it from true to false (it is true in the original), the homepage came up, but not showing the logo. However, when I tried to navigate to another page, I got the same error again.
EDIT: it is not true in the original, don't know where I got that idea from!
I'm not sure but I think this is where a fresh install is using the newer media picker and the old version used the old one - hence the error your cms data has integer IDs and it's expecting UIDs.
You could try going through the doc types and reassigning the picker to use the old media picker. I think that would fix it but maybe someone in the community has a better solution!?
When you posted that I remembered that in an earlier attempt to fix this I had gone in and changed the logo media picker to the newer version, so I went back and changed that back and now I can navigate to the other pages on the site. But the logo still doesn't appear on the home page and now when I go into the back end and click on Home I get a server error saying it can't retrieve data for that node.
What files to copy from old website to clean install?
Hi,
I want to clone an existing Umbraco website.
I have created a new solution in VS2017 and using Nuget installed a clean instance of Umbraco using the same version as the original and using the Umbraco installation wizard connected it to the original database. I just want to be absolutely sure I know which files/folders to copy across from the original installation and when to overwrite files in the new installation and when not to. I've had a couple of fails at this already so I just want to double-check.
Can anyone help with advice? I'd be most grateful.
Cheers, Alistair
This is off top-of-my-head, so don't take it as gospel:
If the original site uses NuGet for any packages then you'll need to re-install those. Likewise, if it uses standard Umbraco packages then re-install those. You may also have some other non-Umbraco DLLs in the /bin/ folder, so check for those.
I'd also recommend using a good Diff tool, like Beyond Compare, to check for other changes. I would compare all config files (ie.
web.config
and/config/*
) for changes. Generally I'd merge in changes from the old files into the new, as you want to keep the newest format, but with existing values (by and large).You will also need to add any CSS files, static images, JavaScript etc. from the original site.
Hi Dan,
Thanks for the reply. As it happens, just before your reply I had tried using WinMerge to compare the two installations and had copied over everything that the new installation didn't have, and then merged the original web.config with the new web.config.
I'm regretting that already, as when I open default.aspx in my browser I get the YSOD with this error
Any idea what's wrong?
Cheers, Alistair
That sounds like you're nearly there. Can you get into the backend and republish all content (right click on the content label at the top of the tree).
Clear all the examine files and umbraco.config files in the app_data and try restarting the solution. Then if it's still happening look at the error log and see if you can narrow it down to certain lines in the template causing issues (most likely around image / content pickers).
Hi Steve, (sorry for calling you Dan)
Just to be sure, is that all the files in the folders under AppData/TEMP/ExaminIndexes as well as AppData/TEMP/Umbraco.config?
Thanks, Alistair
Hi Steve,
Here's what the YSOD reports. Source error:
Stack trace:
Is this the pertinent bit?
Thing is, abovelogo is a text field.
EDIT: ...and if I fill that text field on the Home page the error disappears, and a new 'is not a valid udi' pops up. So this is happening where I have bits of code that test to see if a field is populated and if it is then it inserts the field but if it isn't it ignores it. The code works on the original site. Why doesn't it work here, do you think?
Cheers, Alistair
What version are you on?
Check the value between your new instance and your old one in the web.config of EnablePropertyValueConverters
Try toggling this.
Steve
Hi Steve,
Version 7.6.3
Couldn't find that property in web.config but it was in umbracoSettings.config. When I changed it from true to false (it is true in the original), the homepage came up, but not showing the logo. However, when I tried to navigate to another page, I got the same error again.
EDIT: it is not true in the original, don't know where I got that idea from!
And you've republished all content - right?
Just republished everything again to make sure. It doesn't help, I'm afraid.
Hi,
I'm not sure but I think this is where a fresh install is using the newer media picker and the old version used the old one - hence the error your cms data has integer IDs and it's expecting UIDs.
You could try going through the doc types and reassigning the picker to use the old media picker. I think that would fix it but maybe someone in the community has a better solution!?
See here: https://our.umbraco.org/forum/templates-partial-views-and-macros/86532-string-2293-is-not-a-valid-udi-from-images-in-763
Hi,
When you posted that I remembered that in an earlier attempt to fix this I had gone in and changed the logo media picker to the newer version, so I went back and changed that back and now I can navigate to the other pages on the site. But the logo still doesn't appear on the home page and now when I go into the back end and click on Home I get a server error saying it can't retrieve data for that node.
Delete that picker from the doc type - load hte content node, publish it and then add it back.
HTH
Steve
Hi Steve,
That got it! Thank you so much for your help. Sorted just in time for me to go home for my tea. :)
Cheers, Alistair
I think you need to accept Dan's original answer to the original question but glad we got it sorted!
Have a great weekend!
Of course. Thanks again.
is working on a reply...