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 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

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 "Microsoft SQL Error SQL71564: Error validating element [USERNAME]: The element [USERNAME] has been orphaned from its login and cannot be deployed."

I needed to export a database in BACPAC format today in order to restore it somewhere else, and I encountered the following error. To resolve this issue, I deleted all of the users mentioned in the error log. After successfully creating the BACPAC file, I used it to create a new database with no problems. Error: TITLE: Microsoft SQL Server Management Studio ------------------------------ One or more unsupported elements were found in the schema used as part of a data package. Error SQL71564: Error validating element [USER1]: The element [USER1] has been orphaned from its login and cannot be deployed. Error SQL71564: Error validating element [USER2]: The element [USER2] has been orphaned from its login and cannot be deployed. Error SQL71564: Error validating element [USER3]: The element [USER3] has been orphaned from its login and cannot be deployed. Error SQL71564: Error validating element [USER4]: The element [USER4] has been orphaned from its login and cannot be deployed. Error SQL71