Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Kevin Thomas 14 posts 93 karma points
    Apr 23, 2018 @ 05:58
    Kevin Thomas
    0

    Upgrade to Umbraco 7.7.0+ returns error Invalid object name 'umbracoUser2UserGroup'.

    Attempting to upgrade Umbraco from version 7.2.1. Upgrading the database separately from the code:

    1. Create empty ASP.NET Web Application (.NET Framework)
    2. Add NuGet package for version 7.3.0
    3. Add connection string.
    4. Run the upgrade.

    Rinse and repeat the above steps for additional upgrades. However, unable to get past version 7.7.0 - the highest I could get was version 7.6.13 because of error Invalid object name 'umbracoUser2UserGroup' in the UmbracoTraceLog.

    Because I'm using a clean web site for my database upgrade, I am confident the issue is not due to third-party add-ons or the like.

    I have a solution which I will post in a reply. Adding this forum post in the hopes it will help others, as I see multiple similar unresolved tickets.

  • Kevin Thomas 14 posts 93 karma points
    Apr 23, 2018 @ 06:08
    Kevin Thomas
    0

    My solution was to do the following (see a later reply for an easier alternative to try first):

    Source code: NV Interactive github

    1. Pulled the Umbraco source code for version 7.7.0 (commit hash 0dfbe4d4eb3f4ecb7c1a8f547016178c066601da)
    2. Added my empty ASP.NET Web Application (.NET Framework) into the \src folder
    3. Copied all packages from my empty ASP.NET Web Application (.NET Framework) into \src\packages
    4. Merged my .sln details into \src\umbraco.sln - the Project/EndProject and GlobalSection lines
    5. Removed all Umbraco package/NuGet references from my web application, and replaced them with project references to the Umbraco source code projects.
    6. Edited Umbraco.Core.Security.BackOfficeSignInManager - changed method PasswordSignInAsyncImpl (below).
    7. Ran my web site. I was able to get past the failing authentication and proceed with the upgrade.

    Old BackOfficeSignInManager:

    //check the password for the user, this will allow a developer to auto-link 
    //an account if they have specified an IBackOfficeUserPasswordChecker
    if (await UserManager.CheckPasswordAsync(user, password))
    

    New BackOfficeSignInManager:

    //check the password for the user, this will allow a developer to auto-link 
    //an account if they have specified an IBackOfficeUserPasswordChecker
    if (true)
    
  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    Apr 23, 2018 @ 06:44
    Dave Woestenborghs
    0

    Hi Kevin,

    I saw this last week where it was solved by starting the upgrade in a incognito window.

    It can be that the authentication cookie is causing this.

    Can you try that ?

    Dave

  • Kevin Thomas 14 posts 93 karma points
    Apr 23, 2018 @ 22:19
    Kevin Thomas
    0

    Hi Dave - I did try an Incognito window, did not help. I should have mentioned I tried a number of the other solutions posted to the forum but none of them worked for me.

    I suspect there might be several paths to ending up with this error as the authentication code is somewhat convoluted. For example there are code comments suggesting some of the new user group tables might have actually existed (at least with the same name) at one time in much older Umbraco versions.

    I haven't tried it but in my case, it might have been possible to authenticate in version 7.6.13, update to the 7.7.0 Nuget packages, and then rerun the site before the original 7.6.13 auth cookie expired, because the issue is just in getting past the initial authentication so that the upgrade code can kick in.

  • Kevin Thomas 14 posts 93 karma points
    Apr 23, 2018 @ 22:55
    Kevin Thomas
    0

    I found another successful work-around which is more straight-forward than my initial solution:

    1. Created empty ASP.NET Web Application (.NET Framework)
    2. Added NuGet package for UmbracoCms version 7.6.13
    3. Added connection string
    4. minRequiredPasswordLength="8" useLegacyEncoding="true" (for my application originally Umbraco 7.2.1)
    5. Created local domain in my hosts file
    6. Logged in to the back office using my local domain, ran the upgrade to version 7.6.13. Did not log out.
    7. Upgraded my empty ASP.NET Web Application to Umbraco 7.7.0, accepted all .config overwrites when prompted.
    8. Refreshed the /umbraco link at my local domain.
    9. Was prompted to login again, but this time did not encounter the Invalid object name 'umbracoUser2UserGroup' error.
    10. Ran the 7.7.0 migration to successful completion.

    I would recommend this as the first attempt to resolve the Invalid object name 'umbracoUser2UserGroup' issue, and resort to my code solution only as a last resort.

    I recommend performing Umbraco database upgrades separately from code upgrades by using this empty ASP.NET Web Application (.NET Framework) approach for the database anytime it's necessary to jump many Umbraco versions. This recommendation comes from extensive experience upgrading various Umbraco applications from as far back as version 6.x. Once the database is upgraded successfully, then the code can be upgraded "all at once" directly to the latest version.

Please Sign in or register to post replies

Write your reply to:

Draft