Copied to clipboard

Flag this post as spam?

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


  • Michael 5 posts 75 karma points
    Dec 06, 2017 @ 02:25
    Michael
    0

    Unable to upgrade from 7.3.5

    Hi

    I'm trying to upgrade from 7.3.5 to 7.7.6 via NuGet and have followed all the instructions listed on the general upgrade instructions page and those on the version specific page.

    Everything seems to work fine, on running the site after upgrade I'm redirected to the login page and then the Upgrade Page. However, after I click on the Continue button on the upgrade page I receive an error page stating to "See the log for full details".

    The final entries in the log file are as follows

     2017-12-06 10:31:03,086 [P2448/D2/T14] INFO  Umbraco.Core.DatabaseContext - CanConnect = True
     2017-12-06 10:31:03,086 [P2448/D2/T14] INFO  Umbraco.Core.PluginManager - Resolving umbraco.interfaces.IDiscoverable
     2017-12-06 10:31:03,086 [P2448/D2/T14] INFO  Umbraco.Core.PluginManager - Resolved umbraco.interfaces.IDiscoverable (took 0ms)
     2017-12-06 10:31:03,086 [P2448/D2/T14] INFO  Umbraco.Core.PluginManager - Resolving [Umbraco.Core.Persistence.Mappers.MapperForAttribute]Umbraco.Core.Persistence.Mappers.BaseMapper
     2017-12-06 10:31:03,086 [P2448/D2/T14] INFO  Umbraco.Core.PluginManager - Resolved [Umbraco.Core.Persistence.Mappers.MapperForAttribute]Umbraco.Core.Persistence.Mappers.BaseMapper (took 6ms)
     2017-12-06 10:33:25,843 [P2448/D2/T14] INFO  Umbraco.Core.Configuration.ClientDependencyConfiguration - Updated version number from 916294485 to 1646972363
     2017-12-06 10:33:25,860 [P2448/D2/T14] ERROR Umbraco.Core.Persistence.UmbracoDatabase - Exception (0f8e37e1).
    System.Data.SqlClient.SqlException (0x80131904): Invalid object name 'umbracoUser2UserGroup'.
       at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
       at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
       at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
       at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
       at System.Data.SqlClient.SqlDataReader.get_MetaData()
       at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption)
       at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
       at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
       at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
       at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior)
       at StackExchange.Profiling.Data.ProfiledDbCommand.ExecuteDbDataReader(CommandBehavior behavior) in c:\Code\github\SamSaffron\MiniProfiler\StackExchange.Profiling\Data\ProfiledDbCommand.cs:line 235
       at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()
       at Umbraco.Core.Persistence.PetaPocoCommandExtensions.<>c__DisplayClass5_0.

    Any help would be greatly appreciated.

    Thanks in advance,

    Michael

  • Alex Brown 129 posts 620 karma points
    Dec 06, 2017 @ 10:13
    Alex Brown
    0

    I've had this before when users in SQL have insufficient permissions.

    Check out the following post:

    https://our.umbraco.org/forum/using-umbraco-and-getting-started/89324-ugrading-to-776-invalid-object-name-umbracouser2usergroup

    Make sure your user in SQL is associated with a login (such as sa) and it has admin privileges for the Umbraco db.

  • Michael 5 posts 75 karma points
    Dec 06, 2017 @ 22:50
    Michael
    0

    Thanks for your reply Alex,

    Unfortunately I was already connecting with an account which has admin priviliges on the Umbraco db. Just to be sure I changed the connection string to use sa and still have the same issues when trying to upgrade.

  • Ben Palmer 180 posts 866 karma points c-trib
    Dec 06, 2017 @ 10:32
    Ben Palmer
    0

    Hi Michael,

    Before attempting to fix this in the database manually yourself (and causing issue down the line), backup your database, and change the umbracoConfigurationStatus value to 7.2.8. This should run all migrations again and make sure your database is up to date.

  • Michael 5 posts 75 karma points
    Dec 06, 2017 @ 23:21
    Michael
    0

    Thanks for the reply Alex,

    However, I'm still encountering exactly the same error as before after applying this change. Our biggest issue here is that we have inherited this site from another developer and have no knowledge of what may or may not have been done in the past.

  • Steve Morgan 1348 posts 4457 karma points c-trib
    Dec 07, 2017 @ 11:33
    Steve Morgan
    0

    Check if your umbracoUser2UserGroup table exists.

    The upgrade tries to delete it - if your user doesn't have permissions it will fail.

    Perhaps if it's gone wrong half way in the upgrade it now can't find this table and bombs out.

    Try creating a dummy version of it so it has something to delete?

        CREATE TABLE [dbo].[umbracoUser2UserGroup](
        [userId] [int] NOT NULL,
        [userGroupId] [int] NOT NULL,
     CONSTRAINT [PK_user2userGroup] PRIMARY KEY CLUSTERED 
    (
        [userId] ASC,
        [userGroupId] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    ) ON [PRIMARY]
    
    GO
    
    ALTER TABLE [dbo].[umbracoUser2UserGroup]  WITH CHECK ADD  CONSTRAINT [FK_umbracoUser2UserGroup_umbracoUser_id] FOREIGN KEY([userId])
    REFERENCES [dbo].[umbracoUser] ([id])
    GO
    
    ALTER TABLE [dbo].[umbracoUser2UserGroup] CHECK CONSTRAINT [FK_umbracoUser2UserGroup_umbracoUser_id]
    GO
    
    ALTER TABLE [dbo].[umbracoUser2UserGroup]  WITH CHECK ADD  CONSTRAINT [FK_umbracoUser2UserGroup_umbracoUserGroup_id] FOREIGN KEY([userGroupId])
    REFERENCES [dbo].[umbracoUserGroup] ([id])
    GO
    
    ALTER TABLE [dbo].[umbracoUser2UserGroup] CHECK CONSTRAINT [FK_umbracoUser2UserGroup_umbracoUserGroup_id]
    GO
    
  • Michael 5 posts 75 karma points
    Dec 08, 2017 @ 00:55
    Michael
    0

    From everything I've read and can see User Groups were added as part of 7.7, prior to that an add on was required to facilitate this service. Hence, that table shouldn't exist in my 7.3.5 db, but should be CREATEd on updating to 7.7.6.

    In any case I added all the tables which should be present in a 7.7.6 db but are not present in my db (userGroup, user2UserGroup, userGroup2App, userGroup2NodePermission, and userStartNode).

    Unfortunately this didn't work either; as after I made these changes I could no longer log in to get to the update screen. I assume this has to do with users now belonging to groups, and the group (or user) no longer has upgrade privilleges.

    Thanks for the ideas (and SQL code) though.

Please Sign in or register to post replies

Write your reply to:

Draft