Error after upgrade Kentico from 7-8

giang le asked on August 15, 2014 12:49

Hi all!

After we upgrade Kentico from 7-8 we got a few errors. We tried some solutions but not success.

Image Text

Image Text

Please help me !!!!!

Recent Answers


giang le answered on August 15, 2014 12:52

Server Error in '/' Application.
Invalid column name 'UserShowSplashScreen'.
Invalid column name 'UserWebPartToolbarEnabled'.
Invalid column name 'UserWebPartToolbarPosition'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Invalid column name 'UserShowSplashScreen'.
Invalid column name 'UserWebPartToolbarEnabled'.
Invalid column name 'UserWebPartToolbarPosition'.
0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on August 15, 2014 18:50 (last edited on April 8, 2015 16:12)

Hi,

What was the exact upgrade path? Also, the next error you are getting indicates that the upgrade was not finished correctly.

The UserShowSplashScreen and some other DB columns are getting removed during the upgrade if the upgrade script is called on application start. So, it is important to start the application right after the upgrade - was this done? Please check the CMS_UserSettings table in your upgraded database to see if this column exists.

This column could also be coming from the CMS_AlternativeForm table where the UserShowSplashScreen column is contained in the FormDefinition/FormLayout column, or theUserShowSplashScreen column is contained in the View_Community_Member/View_CMS_User table.

If the system doesn't detect that it has to run the upgrade script (it thinks it has ran already) you get the error with the missing columns. To fix this, you need to make sure youo run the upgrade method once:UpgradeProcedure.Update();

Make sure it runs through it! Make sure it's not skipped by the switch statement e.g: switch (version.ToLowerCSafe()) For example you can run it in the debug mode and skip into the statement manually. (\CMS\App_Code\CMS\UpgradeProcedure.cs).

One more thing - what is the exact version 7 hotfix number? Only instances hotfixed up to hotfix no.85 can be upgraded to Kentico 8. Later hotfixes must wait until Kentico 8.1 release which will be on August 22.

In this particular case I would recommend that you should rollback to pre-hotfix and fix the upgrade issue at first or, even better would be to roll back to the v7, upgrade the project and DB again, run the site, check if it is working.

0 votesVote for this answer Mark as a Correct answer

KenticoTeamAt Backroads answered on August 18, 2014 18:02

Sorry about your error but I'm glad to find I'm not alone in getting the exact same one myself after running the upgrade many times.

Juraj, as I wrote you just this morning, that solution did not work for me despite having gone through the exact steps you've outlined above. The weird thing is that after I did the last upgrade (as I said, I've done it multiple times as practice runs but with no success overall) on Friday morning, I was able to access the admin section and modules with no error throughout the remainder of the day. Over the weekend, my local dev machine (which hosts the upgraded code base) was rebooted and now I'm getting the error again.

0 votesVote for this answer Mark as a Correct answer

KenticoTeamAt Backroads answered on August 18, 2014 18:04

And I should mention that the target site for my upgrade was at hotfix 7.0.56, well below the cut off for ugprades (7.0.85).

0 votesVote for this answer Mark as a Correct answer

KenticoTeamAt Backroads answered on August 18, 2014 18:11

Juraj, unfortunately, after looking at your answer and the error generated it seems there is some contradiction. You state "The UserShowSplashScreen and some other DB columns are getting removed during the upgrade if the upgrade script is called on application start. So, it is important to start the application right after the upgrade - was this done? Please check the CMS_UserSettings table in your upgraded database to see if this column exists."

But the error generated shows that the code is calling Membership.Provider.ValidateUser which runs an update query against CMS_UserSettings and tries to update those exact columns. Of course it fails because the columns have been removed by the upgrade script.

Here's the text of the error that's been generated on my target server;

Line 510:        else
Line 511:        {
Line 512:            e.Authenticated = Membership.Provider.ValidateUser(Login1.UserName, Login1.Password);
Line 513:        }
Line 514:    }

Source File: c:\inetpub\kenticoupgrade\CMS\CMSPages\logon.aspx.cs    Line: 512 

Stack Trace: 


[SqlException (0x80131904): Invalid column name 'UserShowSplashScreen'.
Invalid column name 'UserWebPartToolbarEnabled'.
Invalid column name 'UserWebPartToolbarPosition'.]
   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +392
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +815
   System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) +4515
   System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() +61
   System.Data.SqlClient.SqlDataReader.get_MetaData() +138
   System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +6738869
   System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds) +6741487
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite) +586
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +107
   System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +288
   System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +180
   System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +21
   System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +325
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +420
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +278
   CMS.DataEngine.AbstractDataConnection.ExecuteQuery(String queryText, QueryDataParameters queryParams, QueryTypeEnum queryType, Boolean requiresTransaction) +268

[Exception: 
[DataConnection.HandleError]: 

Query: 
UPDATE CMS_UserSettings SET [UserNickName] = @UserNickName, [UserPicture] = @UserPicture, [UserSignature] = @UserSignature, [UserURLReferrer] = @UserURLReferrer, [UserCampaign] = @UserCampaign, [UserMessagingNotificationEmail] = @UserMessagingNotificationEmail, [UserCustomData] = @UserCustomData, [UserRegistrationInfo] = @UserRegistrationInfo, [UserPreferences] = @UserPreferences, [UserActivationDate] = @UserActivationDate, [UserActivatedByUserID] = @UserActivatedByUserID, [UserTimeZoneID] = @UserTimeZoneID, [UserAvatarID] = @UserAvatarID, [UserBadgeID] = @UserBadgeID, [UserShowSplashScreen] =  UserShowSplashScreen, [UserActivityPoints] = @UserActivityPoints, [UserForumPosts] = @UserForumPosts, [UserBlogComments] = @UserBlogComments, [UserGender] = @UserGender, [UserDateOfBirth] = @UserDateOfBirth, [UserMessageBoardPosts] = @UserMessageBoardPosts, [UserSettingsUserGUID] = @UserSettingsUserGUID, [UserSettingsUserID] = @UserSettingsUserID, [WindowsLiveID] = @WindowsLiveID, [UserBlogPosts] = @UserBlogPosts, [UserWaitingForApproval] = @UserWaitingForApproval, [UserDialogsConfiguration] = @UserDialogsConfiguration, [UserDescription] = @UserDescription, [UserUsedWebParts] = @UserUsedWebParts, [UserUsedWidgets] = @UserUsedWidgets, [UserFacebookID] = @UserFacebookID, [UserAuthenticationGUID] = @UserAuthenticationGUID, [UserSkype] = @UserSkype, [UserIM] = @UserIM, [UserPhone] = @UserPhone, [UserPosition] = @UserPosition, [UserBounces] = @UserBounces, [UserLinkedInID] = @UserLinkedInID, [UserLogActivities] = @UserLogActivities, [UserPasswordRequestHash] = @UserPasswordRequestHash, [UserWebPartToolbarEnabled] =  UserWebPartToolbarEnabled, [UserWebPartToolbarPosition] =  UserWebPartToolbarPosition, [UserInvalidLogOnAttempts] = @UserInvalidLogOnAttempts, [UserInvalidLogOnAttemptsHash] = @UserInvalidLogOnAttemptsHash, [UserAvatarType] = @UserAvatarType, [UserAccountLockReason] = @UserAccountLockReason, [UserPasswordLastChanged] = @UserPasswordLastChanged WHERE [UserSettingsID] = @UserSettingsID

Caused exception: 
Invalid column name 'UserShowSplashScreen'.
Invalid column name 'UserWebPartToolbarEnabled'.
Invalid column name 'UserWebPartToolbarPosition'.
]
0 votesVote for this answer Mark as a Correct answer

giang le answered on August 19, 2014 04:46

Hi Juraj Ondrus, we followed your comment to rollback Kentico version to 7 and re-upgrade (7-8). After upgrade successful, the error "Invalid column name" did not occurred, however the error "Error loading the WebPart..." still occurred. We try replace DLL in bin folder and try a few solutions but not success so we rollback. After rollback we got error "Invalid column name". I don't understand why this error issue. License may be reason of this error occurred,may it not?

0 votesVote for this answer Mark as a Correct answer

KenticoTeamAt Backroads answered on September 3, 2014 18:52

Giang Le, for your information, I was having the same error and regardless of what I tried, I could not get past it and correct it. I even did a database comparison against a fresh install of a version 8 database (which found many differences) and updated my target database and I STILL got the error.

I finally fixed it by simply adding the columns to the CMS_UserSettings table with the following short query;

alter table CMS_UserSettings add UserShowSplashScreen bit go alter table CMS_UserSettings add UserWebPartToolbarEnabled bit go alter table CMS_UserSettings add UserWebPartToolbarPosition nvarchar(10) go

That seemed to fix it but as I stated in my email to support, I've no idea if its the only fix I need unless I run in to another error that wasn't caught. Hopefully there are no more. Rigorous testing will have to be done. In the meantime, we're up and running with our site on version 8. Time to upgrade to 8.1! (rolls eyes)...

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on September 11, 2014 11:46

Hi,

What was the starting version before upgrade? If you have applied hotfix higher than no. 86, the upgrade was not possible. However, last week was published new version of the upgrade that supports higher hotfixes as well. You can download it from here.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.