Skip to main content

Umbraco V8 Upgrade from V7 - Developer Notes

Recently I have started working on upgrading my client's Umbraco v7.15.4 website to Umbraco v8.6.3 (current latest version) and decided to write this blog as it can be very tricky and you might end up spending hours if not days to fix your problems. I'd be very happy if I can help you to save some time and do better planning before doing your upgrade.

Before you start doing anything, you should know that;
  • Umbraco 8 is a major release. There will be a lot of breaking changes, for my case 435 new features, 95 breaking changes and 1254 issues & tasks. 
  • Please check the local development and hosting requirements, otherwise the upgrade will fail and you have to rollback your changes to try again.
    • One important thing, please make sure you have done all your Visual Studio 2017 or 2019 upgrades first.
    • Ensure that you have got .NET Framework 4.7.2 installed.
    • Upgrade your v7 Umbraco project to 7.14+, latest v7 version would be your best option.
  • Umbraco codebase has been fundamentally updated in Umbraco 8.
  • And finally and most importantly; according to this documentation, there is no direct upgrade path from Umbraco 7 to Umbraco 8.
I now know that there is no direct upgrade path from 7 to 8, but when I started working on my upgrade tasks, I didn't have this information (for some reason I couldn't see that information which is so obvious to me now.), and after reading Jon Jones's this article, I decided to follow his path, as my project also have a lot of custom code and a lot of Umbraco data.

First approach;
  • Make sure you have got minimum system requirements.
  • Make sure you have got all the code & db backups.
  • Upgrade the UmbracoCms nuget package.
  • Run Umbraco Installation Wizard to upgrade the database
After the UmbracoCms (and all dependant package) upgrade; I ended up commenting out many lines of code in my solution to just to be able to build the solution without any errors, so I could see the Umbraco Installation Wizard screen, but this wasn't easy as I saw all the problems that Jon Jones mentions in his post + some other problems, including the following ones (please click on them to see the answers that helped me to fix these problems)
Eventually I saw the Umbraco Installation Wizard  which led to seeing more problems and fixing them. Breaking point for me was seeing the following problem as it meant missing umbraco dlls, according to Umbraco forum answers;




















Second approach;

As I mentioned above, before reaching this point, I had to go thru the Umbraco documentation once more to understand the correct path for the upgrade - having said that I think upgrade term could be a little misleading, as this is not really an upgrade, but creating a new Umbraco project, moving and transforming v7 data into v8, and re-creating all the custom code again with a lot of code changes. Please see the steps below for this approach;
  • Make sure you have got minimum system requirements.
  • Make sure you have got all the code & db backups.
  • Fresh up a new 8.6.3 Umbraco website by following these steps, without doing a normal upgrade on the existing v7 project, as there is no direct upgrade path between these 2 version.
  • After making sure all is good with the brand new Umbraco 8 website(Ctrl+F5 will help you fire up the new local website, then you should do a fresh umbraco db installation without creating any templates, and then login to umbraco backoffice and do general smoke tests), do the data migration for content, media and members, from v7 db to v8 db by following these steps.
  • Check the configuration files, settings, sections in Umbraco etc.
  • Move v7 project's custom code into v8 project, and make them work again(a lot of refactoring will be needed for this - there is some up-to-date umbraco documentation which will hopefully help you to understand some of the changes)
With this second approach, creating a new v8 project was pretty smooth, and all seemed okay, but when I started to do the migration,  I started to see the new problems - once again, please follow the links to see the answers that helped me sorting out these problems;
  • Login fails when trying to upgrade
  • Timeout Expired exception during data migration
    • After adding an extended Connection Timeout to my connection string, data migration seemed to be started, but eventually after some hours failed with another Timeout error, you can see that similar problems have been reported before.
    • I couldn't go any further than this due to my current project plan, but when I can I'd like to carry on my investigation for this and hopefully complete the data migration.
Conclusion;
  • It seems to be Umbraco v8 upgrade from v7 is not really an upgrade, but literally creating a new v8 project, doing the data migration, moving the custom code&settings, and making sure all is good again. You should know that for big projects, this is a lot of work and you need to make sure this is really what you want/need to do.
  • When creating new projects, definitely v8 should be your choice as it is the main focus of Umbraco, and it is the greatest version so far.
  • For v7 projects, I wouldn't recommend you to do a v8 upgrade, unless you have got real good reasons and time(and money to spend for this). Umbraco will continue to support v7 which is great news for all v7 projects.
  • For data migration, writing your own data migration code could be a good option, similar to what Paul Seal did.
Hope this will help at least some of you and let me know about your v8 upgrade experience. Thanks for reading.



Comments

Popular posts from this blog

How to fix Umbraco v9 "Boot Failed : Umbraco failed to boot, if you are the owner of the website please see the log file for more details." error

If you have started working with Umbraco v9 and done your first Azure deployment to one of your testing environments, there is a possibility that you might see the following "Boot Failed" error. Error: Checking the logs In order to understand the problem, you should check the Umbarco log file.  The default location for this file is umbraco/Logs and this file contains the Machine name, along with the date information. You can reach this file via Azure's Kudu Service  or alternatively, you can get download your Azure App Service's publish profile and connect your App Service via an FTP application, i.e. FileZilla. See the FileZilla screen below; Once you get your log file, you can download it to your local machine and open it with a text editor, i.e. Notepad++. When you open it, you will see all logs, including the error message. Please be aware, as most things with Umbraco, logging is also customizable, so you can either use the default Umbraco logging which is Micros

How to use JQuery Ajax Methods for Async ASP.NET MVC Action Methods

Making repeatedly calls to async methods can be a nightmare. In this case, it makes sense to use 2 ajax methods, instead of one. Here is a simple solution to overcome this problem. See that  ajaxcalls   is emptied after the success response for the first ajax call and then the second ajax method is used to make one single call to the async action method. Hope it helps. View: @section Scripts{     < script type ="text/javascript">         var smartDebitObject = new Object();         smartDebitObject.MembershipNumber = $( "#MembershipNumber" ).val();         smartDebitObject.ProfileId = $( "#ProfileId" ).val();         smartDebitObject.FirstName = $( "#FirstName" ).val();         smartDebitObject.LastName = $( "#LastName" ).val();         smartDebitObject.AddressLine1 = $( "#AddressLine1" ).val();         smartDebitObject.Postcode = $( "#Postcode" ).val();         smartDebitObject

How to fix Git push error: "RPC failed; curl 56 HTTP/2 stream 7 was reset send-pack: unexpected disconnect while reading sideband packet fatal: the remote end hung up unexpectedly"

Problem Today I saw the following problem when I tried to push my changes to a Git server after doing some work for upgrading an Umbraco v7 project to v8.18.8.  Possible reasons After some investigations, it seems like this could be because of the following reasons; Git is not happy with the amount of changes that are being pushed into the server.  There are possible limitations on the server about the size/amount of files that you can push. Your internet connection is not good and stable enough. Your Git client's version is old. Solution options For me, the easiest option was connecting to another Wifi and trying again. Apparently, this option helped quite a few people, so it is worth giving it a try. Unfortunately, it didn't work for me. A bad internet connection wasn't an option for me either, as my internet is pretty fast (500 Mbps). Similarly, my Git client version was the latest version (git version 2.41.0.windows.3).  On StackOverflow, there were a lot of recommendat