Upgrades Questions on upgrading to version 5.x.
Version 5.x > Upgrades > Upgrade from 5.0 to 5.5 and CustomEventHandler View modes: 
User avatar
Member
Member
Peter - 11/27/2011 11:02:21 PM
   
Upgrade from 5.0 to 5.5 and CustomEventHandler
Hi,
I'm upgrading our website from 5.0 to 5.5 .... to 6.0
So far I've upgraded to 5.5. All works fine except login for which we use CustomEventHandler which throws an exception in regards to database issue.

Anyone had the same error?

Here is the error.
[DataConnection.ExecuteQuery]: Query: UPDATE CMS_User SET [UserName] = @UserName, [FirstName] = @FirstName, [MiddleName] = @MiddleName, [LastName] = @LastName, [FullName] = @FullName, [Email] = @Email, [UserPassword] = @UserPassword, [PreferredCultureCode] = @PreferredCultureCode, [PreferredUICultureCode] = @PreferredUICultureCode, [UserEnabled] = @UserEnabled, [UserIsEditor] = @UserIsEditor, [UserIsGlobalAdministrator] = @UserIsGlobalAdministrator, [UserIsExternal] = @UserIsExternal, [UserPasswordFormat] = @UserPasswordFormat, [UserCreated] = @UserCreated, [LastLogon] = @LastLogon, [UserStartingAliasPath] = @UserStartingAliasPath, [UserGUID] = @UserGUID, [UserLastModified] = @UserLastModified, [UserLastLogonInfo] = @UserLastLogonInfo, [UserIsHidden] = @UserIsHidden, [UserVisibility] = @UserVisibility, [UserIsDomain] = @UserIsDomain, [UserHasAllowedCultures] = @UserHasAllowedCultures, [UserSiteManagerDisabled] = @UserSiteManagerDisabled WHERE [UserID] = @UserID: caused exception: Must declare the scalar variable "@UserSiteManagerDisabled".
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.Exception: [DataConnection.ExecuteQuery]: Query: UPDATE CMS_User SET [UserName] = @UserName, [FirstName] = @FirstName, [MiddleName] = @MiddleName, [LastName] = @LastName, [FullName] = @FullName, [Email] = @Email, [UserPassword] = @UserPassword, [PreferredCultureCode] = @PreferredCultureCode, [PreferredUICultureCode] = @PreferredUICultureCode, [UserEnabled] = @UserEnabled, [UserIsEditor] = @UserIsEditor, [UserIsGlobalAdministrator] = @UserIsGlobalAdministrator, [UserIsExternal] = @UserIsExternal, [UserPasswordFormat] = @UserPasswordFormat, [UserCreated] = @UserCreated, [LastLogon] = @LastLogon, [UserStartingAliasPath] = @UserStartingAliasPath, [UserGUID] = @UserGUID, [UserLastModified] = @UserLastModified, [UserLastLogonInfo] = @UserLastLogonInfo, [UserIsHidden] = @UserIsHidden, [UserVisibility] = @UserVisibility, [UserIsDomain] = @UserIsDomain, [UserHasAllowedCultures] = @UserHasAllowedCultures, [UserSiteManagerDisabled] = @UserSiteManagerDisabled WHERE [UserID] = @UserID: caused exception: Must declare the scalar variable "@UserSiteManagerDisabled".

Source Error:

Line 301: aUser.FullName = fullName;
Line 302:
Line 303: UserInfoProvider.SetUserInfo(aUser);
Line 304: UserInfoProvider.SetPassword(aUser, imisPwd);

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 11/28/2011 2:49:33 AM
   
RE:Upgrade from 5.0 to 5.5 and CustomEventHandler
Hi,

I assume that you have updated all the references to the DLLs in your custom handler and also the reference in the web project to your custom custom handler.

The error is very similar to one described in this blog post and use the second package (after this, you might need to use the first one as well + do not forget to restart the application).

Best regards,
Juraj Ondrus

User avatar
Member
Member
Peter - 11/28/2011 9:24:17 PM
   
RE:Upgrade from 5.0 to 5.5 and CustomEventHandler
Thank you, that worked.