Error While Upgrading kentico 8.0 site Kentico 8.1

Uday Kumar Reddy Arikatla asked on November 4, 2014 09:49

I've Upgraded Kentico 8 site to 8.1. After upgrading I am not able to open any page type in my content tree. When ever I click on a page type I'm getting a pop up stating Internal server error. Please find the attachment for more details. Please help me in resolving this. My site is running on free license edition.

when i checked my eventlogs. I found the below in the event description

Message: String was not recognized as a valid DateTime.

Exception type: System.FormatException Stack Trace: at System.DateTime.Parse(String s, IFormatProvider provider) at System.Convert.ToDateTime(String value, IFormatProvider provider) at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider) at CMS.DataEngine.SimpleDataClass.SetData(Int32 columnIndex, Object value) at CMS.DataEngine.SimpleDataClass.LoadData(DataRow dr) at CMS.DocumentEngine.TreeNode.LoadFromDataRow(DataRow dr) at CMS.DocumentEngine.TreeNode.New[NodeType](String className, DataRow dataRow, TreeProvider treeProvider) at CMS.DocumentEngine.TreeProvider.SelectSingleNode[NodeType](String siteName, String aliasPath, String cultureCode, Boolean combineWithDefaultCulture, String className, Boolean selectOnlyPublished, Boolean checkPermissions, Boolean selectCoupledData) at CMS.DocumentEngine.TreeProvider.SelectSingleNode[NodeType](Int32 nodeId, String cultureCode, Boolean combineWithDefaultCulture, Boolean coupledData) at CMS.DocumentEngine.TreeProvider.SelectSingleNode(Int32 nodeId, String cultureCode) at CMS.UIControls.ContentUrlRetriever.GetRequestedUrlInternal(UIPageURLSettings settings, Boolean ajaxRequest) at CMS.UIControls.ContentUrlRetriever.GetRequestedUrl(String eventArgument, Boolean ajaxRequest) at CMS.UIControls.ContentUrlRetriever.OnPreInit(Object sender, EventArgs e) at System.EventHandler.Invoke(Object sender, EventArgs e) at CMS.UIControls.AbstractCMSPage.OnPreInit(EventArgs e) at CMS.UIControls.CMSPage.OnPreInit(EventArgs e) at CMSModules_Content_CMSDesk_Default.OnPreInit(EventArgs e) in c:\inetpub\wwwroot\Howlermail_29102014_1630\CMS\CMSModules\Content\CMSDesk\Default.aspx.cs:line 165 at System.Web.UI.Page.PerformPreInit() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Please help me in resolving this.

Recent Answers

Brenden Kehren answered on November 4, 2014 13:52

Did the upgrade succeed? Have you opened it in Visual Studio and built the website?

0 votesVote for this answer Mark as a Correct answer

Uday Kumar Reddy Arikatla answered on November 4, 2014 14:03

yes, there was no error. It just gave me a pop up that two files are created with new extension make your custom changes and finish. I've built it in visual studio and I see no errors. I see the version in cmsdesk as 8.1 but in kentico installation manager 8, it is still showing 8.0

0 votesVote for this answer Mark as a Correct answer

Virgil Carroll answered on November 4, 2014 15:29

In all the upgrades I've done to 8.1 so far, I've had to at the minimum perform an IIS reset and restart my browser and a couple of times restart the computer. For some reason something stays locked in the cache (so I think) and sometimes it takes extreme measure to get it to clear. After those steps it has always worked fine.

As far as the installation manager, one of the quirks of the upgrade is you need to download the full install package and install the new installation manager for 8.1. When you run set-up you can select 'install program files only' and it will add the new version of all the administrative tools. You should then see it as a separate application (you will still have the 8.0 version on your computer as well)

0 votesVote for this answer Mark as a Correct answer

Uday Kumar Reddy Arikatla answered on November 5, 2014 12:55

I've upgraded with installation manager 8.1. It is shown as 8.1 after upgrading. But still I'm not able to open any page type in my content tree. I'm getting error message as String was not recognized as a valid DateTime.

When I tried to debug by putting break point in ~\CMSModules\Content\CMSDesk\Default.aspx.cs, I'm getting exception (i.e String was not recognized as a valid DateTime) at base.OnPreInit(e) method call in OnPreInit method.

0 votesVote for this answer Mark as a Correct answer

Josef Dvorak answered on November 5, 2014 17:23

Hi Uday,

This error is usually caused by either browser cache not being cleared after upgrade, or by post-upgrade tasks not executing properly. Can you please try clearing your browser cache or accessing the site using a private browser session?

If that does not help, could you please run this SQL query against your database and check if both values are the same?

SELECT KeyName, KeyValue
FROM CMS_SettingsKey
WHERE KeyName IN ('CMSDBVersion', 'CMSDataVersion')

If they are not the same, see if you can find any messages in the Event log related to Upgrade to verify if it ran at all, or determine why it failed.

0 votesVote for this answer Mark as a Correct answer

Sabyasachi Panda answered on March 23, 2015 11:26

Hi , I upgraded my site from 7.0.58 to 8.2.

I have upgraded code separately and run sql scripts in the database separately.

It showed all operation completed successfully.

After up-gradation, I can't open my page types in content tree. It's throwing the same above exception "String was not recognized as a valid DateTime", as well as while creating a document it's throwing "Null Reference Exception"

I executed the query suggested above and it showed me CMSDataVersion 8.0 CMSDBVersion 8.2

Can any one please suggest what can be done?


0 votesVote for this answer Mark as a Correct answer

Carl Mason answered on March 31, 2015 17:28 (last edited on March 31, 2015 17:45)

Hi, I also tried the method of upgrade as Sabyasachi Panda above to save time on upgrading instances where the project code folders are the same. The databases are different in name and content. Basically I ran the upgrade installers on the first project instance and corrected all code. For all other instances I planned to use a copy of the corrected and tested project folder. Run SQL upgrade scripts against other databases to bring them up to 8.2 and then change the connection string to the new instance to use the correct database. I have 7 upgrades where the project folders are almost exact except the web.config connection string. My plan was to just upgrade the databases with sql upgrade scripts. IS this a possible method? Otherwise after initial testing by the customer I will have to run installer upgrade again so that content is update before going live. Did anyone solve the string data/time error?

UPDATE: I ran a refresh query from an old post just to see if it would work since this is a test environment and it did eliminate the string error but the query had its own errors. I posted query and errors below. I did notice the CMSDataVersion is at 7.0 while the CMSDBVersion is at 8.2. Not sure if that is also a problem.

/Refresh all views/

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

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


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

Errors: Msg 15165, Level 16, State 1, Procedure sp_refreshsqlmodule_internal, Line 55 Could not find object 'dbo.View_CMS_Tree_Joined_Regular' or you do not have permission. Msg 15165, Level 16, State 1, Procedure sp_refreshsqlmodule_internal, Line 55 Could not find object 'dbo.View_CMS_Tree_Joined_Linked' or you do not have permission.


0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on April 2, 2015 09:23


It looks like you ran the upgrades vrom v7 to 8.2 without launching the site after each upgrade (it is said in instructions to run the site). This is important step since some new objects are imported into the DB, some code is adjusted and so on. After launching the site you should see UPGRADE FINISH in Kentico Event log.

You are upgrading from v8.0 to 8.1 - so basically you can use the same project folder, that was upgraded from 8.0 to 8.1, then run the SQL script to upgrade the DB and connect it to the project. This will launch the upgrade auto-code. For the upgrades from version 7 - you need to upgrade from version to version and launch the site after each, make sure it wokrs and you see the upgrade finish. This also helps us to identify issues - it is hard to tell when and what went wrong after several upgrades.

We try to make the upgrade as easy as possible - that's why the automatic code execution. If this kind of upgrade was possible, it would be mentioned in the instructions and supported. Right now, this way is not supported. In some cases it could work - but there can be issues in backend that may arise under special circumstances or by future upgrades/hotfixes.

0 votesVote for this answer Mark as a Correct answer

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