Copied to clipboard

Flag this post as spam?

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


  • Richard 4 posts 74 karma points
    Dec 02, 2016 @ 15:01
    Richard
    0

    Upgrading to Version 7.5.4

    Hi

    I am trying to upgrade umbraco for an existing site.

    The site is currently on 6.1.6

    I need to upgrade to the latest release 7.5.4

    I have got so far and it is now displaying the AuthorizeUpgrade login page.

    Unfortunately, logging in with admin user fails. I am getting a 400 Bad Request error. Looking in the Logs I see the following SQL exceptions:

    An error occurred attempting to save a user instance during upgrade, normally this warning can be ignored. Exception: System.Data.SqlClient.SqlException (0x80131904): Invalid column name 'securityStampToken'. Invalid column name 'failedLoginAttempts'. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action1 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.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, TaskCompletionSource1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at StackExchange.Profiling.Data.ProfiledDbCommand.ExecuteNonQuery() in c:\Code\github\SamSaffron\MiniProfiler\StackExchange.Profiling\Data\ProfiledDbCommand.cs:line 266 at Umbraco.Core.Persistence.PetaPocoCommandExtensions.<>cDisplayClass1.0() at Umbraco.Core.Persistence.FaultHandling.RetryPolicy.ExecuteAction[TResult](Func1 func) at Umbraco.Core.Persistence.PetaPocoCommandExtensions.ExecuteNonQueryWithRetry(IDbCommand command, RetryPolicy cmdRetryPolicy, RetryPolicy conRetryPolicy) at Umbraco.Core.Persistence.PetaPocoCommandExtensions.ExecuteNonQueryWithRetry(IDbCommand command, RetryPolicy retryPolicy) at Umbraco.Core.Persistence.PetaPocoCommandExtensions.ExecuteNonQueryWithRetry(IDbCommand command) at Umbraco.Core.Persistence.Database.Update(String tableName, String primaryKeyName, Object poco, Object primaryKeyValue, IEnumerable1 columns) at Umbraco.Core.Persistence.Database.Update(Object poco, Object primaryKeyValue, IEnumerable1 columns) at Umbraco.Core.Persistence.Repositories.UserRepository.PersistUpdatedItem(IUser entity) at Umbraco.Core.Cache.DefaultRepositoryCachePolicy2.CreateOrUpdate(TEntity entity, Action1 persistMethod) at Umbraco.Core.Persistence.Repositories.RepositoryBase2.PersistUpdatedItem(IEntity entity) at Umbraco.Core.Persistence.UnitOfWork.PetaPocoUnitOfWork.Commit(Action`1 transactionCompleting) at Umbraco.Core.Persistence.UnitOfWork.PetaPocoUnitOfWork.Commit() at Umbraco.Core.Services.UserService.Save(IUser entity, Boolean raiseEvents) ClientConnectionId:efbadf63-a573-4fac-940b-7bb29a144554 Error Number:207,State:1,Class:16 2016-12-02 14:55:08,152 [P11240/D6/T16] INFO Umbraco.Core.Security.BackOfficeSignInManager - Event Id: 0, state: Login attempt failed for username admin from IP address ::1

    I'm particularly concerned about these:

    Invalid column name 'securityStampToken'. Invalid column name 'failedLoginAttempts'.

    Any thoughts on this. My understanding is that this AuthoriseUpdate is supposed to do the DB updates which I can't do if it is already expecting fields to be there which aren't!

    Can I upgrade directly from 6.1.6 to 7.5.4 or do I need to upgrade to version 7.0 first and then 7.5.4 ? I believe I did try this but the upgrade blitzed my web.config file!

    Any help would be most appreciated as this taking way longer that I need it to!

    Kind Regards

    Richard

  • Jeremy Newman 18 posts 190 karma points
    Dec 04, 2016 @ 01:15
    Jeremy Newman
    0

    This article has a section upgrading from 6 to 7... I have upgraded from 4.7.1 through 6 and to 7.4.3 with this guide twice. I believe the key for you is under the section titled 'Almost There'... It talks about removing dll's and web config entries and running some Sql code.

    http://www.blix.co/blog/2014/6/5/follow-the-path-upgrading-umbraco-from-v4-to-v7.aspx

  • Richard 4 posts 74 karma points
    Dec 05, 2016 @ 09:58
    Richard
    0

    Hi.

    Thanks for the reply Jeremy. I had already looked through that article but nothing solved my problem.

    I eventually got it working by adding "useLegacyEncoding="true" to UsersMembershipProvider element.

    No idea why but I found a post in this forum in which loads of people were having the same issue although many solved it in different ways!!

    Anyway, I'm now stuck on the DB updates and recieving this error:

    The database failed to upgrade. ERROR: The database configuration failed with the following message: Cannot insert duplicate key row in object 'dbo.umbracoNode' with unique index 'IXumbracoNodeuniqueID'. The duplicate key value is (98bb1e15-b74c-12fb-6136-ec30dfa016a8).

    Referring back to your article Jeremy - there is nothing about this error in that article relating to DB updates. I've also googled it and nothing that seems relevant!

    Forthermore I don't really get the error as I don't even have an index called IXumbracoNodeuniqueID in the DB.

    Anyone know what this means and how to fix!?

    Richard

  • Richard 4 posts 74 karma points
    Dec 16, 2016 @ 11:09
    Richard
    0

    Hi

    Anyone got any ideas on this?

    Upgrading from 7.2.2 now to 7.5.6 and getting the following DB upgrade error:

    Cannot insert duplicate key row in object 'dbo.umbracoNode' with unique index 'IXumbracoNodeuniqueID

    Looking in the logs I see the following to update statements:

    2016-12-16 11:08:43,463 [P8448/D2/T10] INFO Umbraco.Core.Persistence.Migrations.MigrationRunner - Executing sql statement 518: UPDATE [umbracoNode] SET [uniqueID] = '98bb1e15-b74c-12fb-6136-ec30dfa016a8' WHERE [id] = 4309

    2016-12-16 11:08:43,464 [P8448/D2/T10] INFO Umbraco.Core.Persistence.Migrations.MigrationRunner - Executing sql statement 519: UPDATE [umbracoNode] SET [uniqueID] = '98bb1e15-b74c-12fb-6136-ec30dfa016a8' WHERE [id] = 4311

    So you can see that the value of UniqueID is the same for both which I presume is the problem.

    Not sure why its happening though or how to fix.....any ideas?

    Kind Regards

    Richard

  • Jeremy Newman 18 posts 190 karma points
    Dec 17, 2016 @ 18:44
    Jeremy Newman
    0

    I think if you check the article above there is a bit of SQL to run which will get you past this error. I would run all four fixes.

    --Fix 1
    
    ALTER TABLE [dbo].[cmsMacroProperty] drop CONSTRAINT [DF_macroProperty_macroPropertyHidden]
    
    GO 
    
    ALTER TABLE [dbo].[cmsMacroProperty] ADD  CONSTRAINT [DF_cmsMacroProperty_macroPropertyHidden]  DEFAULT ('0') FOR [macroPropertyHidden]
    
    GO
    
    
    
    --Fix 2
    
    ALTER TABLE [dbo].[cmsMacroProperty]  WITH CHECK ADD  CONSTRAINT [FK_cmsMacroProperty_cmsMacroPropertyType_id] FOREIGN KEY([macroPropertyType])
    
    REFERENCES [dbo].[cmsMacroPropertyType] ([id])
    
    GO
    
    ALTER TABLE [dbo].[cmsMacroProperty] CHECK CONSTRAINT [FK_cmsMacroProperty_cmsMacroPropertyType_id]
    
    GO
    
    
    
    --Fix 3
    
    ALTER TABLE [dbo].[cmsMacroProperty] DROP CONSTRAINT [FK_umbracoMacroProperty_umbracoMacroPropertyType]
    
    GO
    
    
    
    --Fix 4
    
    ALTER TABLE [dbo].[cmsTagRelationship]  WITH CHECK ADD CONSTRAINT [FK_cmsTagRelationship_umbracoNode_id] FOREIGN KEY([nodeId])
    
    REFERENCES [dbo].[umbracoNode] ([id])
    
    GO
    
    ALTER TABLE [dbo].[cmsTagRelationship] CHECK CONSTRAINT [FK_cmsTagRelationship_umbracoNode_id]
    
    GO
    
Please Sign in or register to post replies

Write your reply to:

Draft