Installation and deployment Questions on installation, system configuration and deployment to the live server.
Version 6.x > Installation and deployment > Problems upgrading 5.5R2 to Kentico 6 View modes: 
User avatar
Member
Member
david.murphy-redington.co - 2/27/2012 5:27:03 AM
   
Problems upgrading 5.5R2 to Kentico 6
Hello,

We are currently upgrading our site to Kentico 6 from 5.5R2. We are having some problems with this however.

At first I ran the upgrade scripts and copied the files into our 5.5R2 This caused many issues with our custom code due to undocumented breaking changes. We are currently fixing these issues. When I went to CMSDesk it didn't work either.

To resolve the CMS Desk side of things I did a fresh install of Kentico and pointed it to a copy of our 5.5R2 Database that has had the upgrade SQL scripts run on it. Whilst there were a couple of database errors that I solved this still has some problems. When I go to a tree node I get an error that looks like this :



Input string was not in a correct format.
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.FormatException: Input string was not in a correct format.

Source Error:





Line 30: tree.CombineWithDefaultCulture = true;
Line 31:
Line 32: TreeNode node = DocumentHelper.GetDocument(nodeId, CMSContext.PreferredCultureCode, tree);
Line 33: if (node != null)
Line 34: {

Source File: c:\inetpub\wwwroot\KenticoCMSTest\CMSModules\Content\CMSDesk\ContentEditFrameset.aspx.cs Line: 32

Stack Trace:





[FormatException: Input string was not in a correct format.]
System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +12630933
System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +224
System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider) +435
CMS.DataEngine.SimpleDataClass.SetData(Int32 columnIndex, Object value) +291
CMS.DataEngine.SimpleDataClass.LoadDataRow(DataRow dr) +214
CMS.DataEngine.SimpleDataClass.RunNew(String className, DataRow dataRowObject) +111

[Exception: Failed to create new object of class 'CMS.MenuItem': Input string was not in a correct format.]
CMS.DataEngine.SimpleDataClass.RunNew(String className, DataRow dataRowObject) +267
CMS.TreeEngine.TreeNode.NewInstanceFromDataRow(DataRow dataRow, String className, TreeProvider existingTreeProvider) +233
CMS.WorkflowEngine.ContentDocument.New(DataRow dataRow, String className, TreeProvider treeProvider) +171
CMS.TreeEngine.TreeNode.New(DataRow dataRow, String className, TreeProvider treeProvider) +126
CMS.TreeEngine.TreeProvider.SelectSingleNode(String siteName, String aliasPath, String cultureCode, Boolean combineWithDefaultCulture, String className, Boolean selectOnlyPublished, Boolean checkPermissions, Boolean selectCoupledData) +1905
CMS.TreeEngine.TreeProvider.SelectSingleNode(Int32 nodeId, String cultureCode, Boolean combineWithDefaultCulture, Boolean coupledData) +1075
CMS.TreeEngine.TreeProvider.SelectSingleNode(Int32 nodeId, String cultureCode, Boolean combineWithDefaultCulture) +19
CMS.WorkflowEngine.DocumentHelper.GetDocument(Int32 nodeId, String cultureCode, Boolean combineWithDefaultCulture, TreeProvider tree) +83
CMSModules_Content_CMSDesk_ContentEditFrameset.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\KenticoCMSTest\CMSModules\Content\CMSDesk\ContentEditFrameset.aspx.cs:32
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
System.EventHandler.Invoke(Object sender, EventArgs e) +0
CMS.UIControls.CMSPage.OnLoad(EventArgs e) +162
System.Web.UI.Control.LoadRecursive() +71
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3064


I've tried to work on this and it seems to be one of the UI Culture strings? Or maybe that is wrong. Have you seen this error before, do you know how to fix it?


I then thought I'd try a different route, I can get the Site Manger up in version 6, so I tried to do an export from there and then do an import into a fresh version 6... when I do that I get this error :

SELECT PersonalizationGUID FROM CMS_Personalization WHERE PersonalizationUserID IN (SELECT UserID FROM CMS_User WHERE UserName IN (SELECT ItemName FROM Func_Selection_ParseNames(@List_b5920d67_a8d3_4c61_8893_11c6199d9887)) ) : caused exception: Cannot resolve the collation conflict between "Latin1_General_CI_AS" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.


Which is not so useful.

Any thoughts? Advice?

User avatar
Member
Member
david.murphy-redington.co - 2/27/2012 6:04:34 AM
   
RE:Problems upgrading 5.5R2 to Kentico 6
I just tried to do a full export from 5.5R2 and got

[DataConnection.ExecuteQuery]: Query: SELECT MetaFileID, MetaFileObjectID, MetaFileObjectType, MetaFileGroupName, MetaFileName, MetaFileExtension, MetaFileSize, MetaFileMimeType, MetaFileImageWidth, MetaFileImageHeight, MetaFileGUID, MetaFileLastModified, MetaFileSiteID FROM CMS_MetaFile WHERE ((MetaFileObjectType = 'community.friend')) AND (MetaFileObjectID IN ( {LOADS OF NUMBERS} ) : caused exception: Internal error: An expression services limit has been reached. Please look for potentially complex expressions in your query, and try to simplify them.

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 2/27/2012 9:09:18 AM
   
RE:Problems upgrading 5.5R2 to Kentico 6
Hello,


The API changes between 5.5 R2 and 6.0 are documented here: Changes in the API.


Regarding the first error: We encountered this error when the document type views in the database were not refreshed after the upgrade scripts. You can refresh them when you hit the save button in Site manager -> Development -> Document types -> edit -> Save or by the SQL script which refreshes all views:

/*Refresh all views*/

DECLARE @statusCursor CURSOR;
SET @statusCursor = CURSOR FOR SELECT name FROM sysobjects WHERE OBJECTPROPERTY(id, N'IsView') = 1;

DECLARE @viewName nvarchar(450);
DECLARE @viewSchema nvarchar(450);

OPEN @statusCursor
FETCH NEXT FROM @statusCursor INTO @viewName;
WHILE @@FETCH_STATUS = 0
BEGIN

SET @viewSchema = (select TOP 1 TABLE_SCHEMA from information_schema.views WHERE TABLE_NAME = @viewName)
SET @viewName = @viewSchema + '.' + @viewName;

EXECUTE sp_refreshview @viewName;

FETCH NEXT FROM @statusCursor INTO @viewName;
END

CLOSE @statusCursor;
DEALLOCATE @statusCursor;
GO

Regarding the second error: Do you import it to a database with different collation?

Regarding the third error: Please see here: http://devnet.kentico.com/Forums.aspx?forumid=46&threadid=25121


Best regards,
Helena Grulichova

User avatar
Member
Member
david.murphy-redington.co - 3/1/2012 4:30:06 AM
   
RE:Problems upgrading 5.5R2 to Kentico 6
hello! :) .. thanks for the previous reply. I found out I was using the wrong upgrade script for the Database,.. I was using the script that was in the SQL Upgrade folder of the full install, not the script that was in the SQL folder of the upgrade .zip file,.. very confusing.

I have two problems.. firstly the query in CMS_Query table that is like this :
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 WHERE [UserSettingsID] = @UserSettingsID


Has a number of problems with the parameters being passed to it, I have adjusted the query to work so I can log in, but I'm not sure if that is pointing to a problem with my upgrade.

More pressingly though, I have the CMS Desk up and running, but the Tree View has this error :


Invalid column name 'DocumentIsArchived'.
Invalid column name 'DocumentLastVersionName'.
Invalid column name 'DocumentLastVersionType'.
Invalid column name 'DocumentLastVersionMenuRedirectUrl'.
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 'DocumentIsArchived'.
Invalid column name 'DocumentLastVersionName'.
Invalid column name 'DocumentLastVersionType'.
Invalid column name 'DocumentLastVersionMenuRedirectUrl'.


Stack Trace:

[SqlException (0x80131904): Invalid column name 'DocumentIsArchived'.
Invalid column name 'DocumentLastVersionName'.
Invalid column name 'DocumentLastVersionType'.
Invalid column name 'DocumentLastVersionMenuRedirectUrl'.]
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +404
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() +412
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1363
System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +59
System.Data.SqlClient.SqlDataReader.get_MetaData() +118
System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +6387873
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +6389442
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +538
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +28
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +256
System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +19
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) +306
CMS.DataProviderSQL.DataConnection.ExecuteQuery(String queryText, QueryDataParameters queryParams, QueryTypeEnum queryType, Boolean requiresTransaction) +232

[Exception: [DataConnection.ExecuteQuery]: Query: SELECT NodeID, NodeAliasPath, NodeName, NodeParentID, NodeClassID, NodeLevel, NodeChildNodesCount, NodeLinkedNodeID, DocumentName, DocumentCulture, DocumentModifiedWhen, DocumentMenuRedirectUrl, ClassName, DocumentType, DocumentIsArchived, DocumentPublishedVersionHistoryID, DocumentWorkflowStepID, DocumentCheckedOutByUserID, DocumentCheckedOutVersionHistoryID, DocumentPublishFrom, DocumentPublishTo, Published, DocumentLastVersionName, DocumentLastVersionType, DocumentLastVersionMenuRedirectUrl FROM View_CMS_Tree_Joined WHERE (NodeSiteID = 2) AND (NodeAliasPath = N'/') : caused exception: Invalid column name 'DocumentIsArchived'.
Invalid column name 'DocumentLastVersionName'.
Invalid column name 'DocumentLastVersionType'.
Invalid column name 'DocumentLastVersionMenuRedirectUrl'.]
CMS.DataProviderSQL.DataConnection.ExecuteQuery(String queryText, QueryDataParameters queryParams, QueryTypeEnum queryType, Boolean requiresTransaction) +452
CMS.DataEngine.GeneralConnection.RunQuery(QueryParameters query) +349
CMS.DataEngine.GeneralConnection.ExecuteQuery(QueryParameters query) +470
CMS.DataEngine.GeneralConnection.ExecuteQuery(String queryName, QueryDataParameters parameters, String where, String orderBy, Int32 topN, String columns, Int32 offset, Int32 maxRecords, Int32& totalRecords) +96
CMS.TreeEngine.TreeProvider.ExecuteQuery(String queryName, QueryDataParameters parameters, String where, String orderBy, Int32 topN, String columns, Int32 offset, Int32 maxRecords, Int32& totalRecords) +287
CMS.TreeEngine.TreeProvider.SelectNodes(NodeSelectionParameters parameters) +1819
CMS.WorkflowEngine.DocumentHelper.GetDocuments(NodeSelectionParameters parameters, TreeProvider tree) +152
CMS.WorkflowEngine.DocumentHelper.GetDocuments(String siteName, String aliasPath, String cultureCode, Boolean combineWithDefaultCulture, String classNames, String where, String orderBy, Int32 maxRelativeLevel, Boolean selectOnlyPublished, Int32 topN, String columns, TreeProvider tree) +225
CMS.CMSSiteMapProvider.TreeSiteMapProvider.BuildSiteMap() +425
CMS.CMSSiteMapProvider.TreeSiteMapProvider.GetNodeByAliasPath(String aliasPath) +75
CMSModules_Content_Controls_ContentTree.EnsureNode(TreeNode node, Int32 nodeId) +695
CMSModules_Content_Controls_ContentTree.OnPreRender(EventArgs e) +358
System.Web.UI.Control.PreRenderRecursiveInternal() +113
System.Web.UI.Control.PreRenderRecursiveInternal() +222
System.Web.UI.Control.PreRenderRecursiveInternal() +222
System.Web.UI.Control.PreRenderRecursiveInternal() +222
System.Web.UI.Control.PreRenderRecursiveInternal() +222
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4201


Which feels like there may be an update to the DocumentTypes that I am missing??

Thank you for your help so far.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 3/1/2012 10:46:12 PM
   
RE:Problems upgrading 5.5R2 to Kentico 6
Hi,

1. What is the real error message? Is it something like mentioned here? If so, please use appropriate package.

2. It seems that the schemas were not refreshed correctly or the SQL upgrade script was not executed correctly. Could you please check the CMS_Document table whether it contains given columns?

Best regards,
Juraj Ondrus