We upgraded an installation from 5.6 to 6.0.2 this weekend. We ran into a few snags mostly dealing with one skin, so no big deal, the skin was just really old and has been upgraded a few times. Today we realized that when we try to add a new portal to the installation we get the following error:
Error parsing Portal TemplateError converting data type nvarchar to int. The statement has been terminated. at System.Data.SqlClient.SqlConnection. (SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlDataReader.ConsumeMetaData() at System.Data.SqlClient.SqlDataReader.get_MetaData() at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteScalar() at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteScalar(SqlConnection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteScalar(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteScalar(String connectionString, String spName, Object[] parameterValues) at DotNetNuke.Data.SqlDataProvider.AddModule(Int32 ContentItemID, Int32 PortalID, Int32 ModuleDefID, Boolean AllTabs, DateTime StartDate, DateTime EndDate, Boolean InheritViewPermissions, Boolean IsDeleted, Int32 createdByUserID) at DotNetNuke.Entities.Modules.ModuleController.AddModuleInternal(ModuleInfo module) at DotNetNuke.Entities.Modules.ModuleController.AddModule(ModuleInfo module) at DotNetNuke.Entities.Modules.ModuleController.DeserializeModule(XmlNode nodeModule, XmlNode nodePane, Int32 portalId, Int32 tabId, PortalTemplateModuleAction mergeTabs, Hashtable hModules) at DotNetNuke.Entities.Tabs.TabController.DeserializePanes(XmlNode nodePanes, Int32 PortalId, Int32 TabId, PortalTemplateModuleAction mergeTabs, Hashtable hModules) at DotNetNuke.Entities.Tabs.TabController.DeserializeTab(XmlNode nodeTab, TabInfo objTab, Hashtable hTabs, Int32 PortalId, Boolean IsAdminTemplate, PortalTemplateModuleAction mergeTabs, Hashtable hModules) at DotNetNuke.Entities.Portals.PortalController.ParseTab(XmlNode nodeTab, Int32 PortalId, Boolean IsAdminTemplate, PortalTemplateModuleAction mergeTabs, Hashtable& hModules, Hashtable& hTabs, Boolean IsNewPortal) at DotNetNuke.Entities.Portals.PortalController.ParseTabs(XmlNode nodeTabs, Int32 PortalId, Boolean IsAdminTemplate, PortalTemplateModuleAction mergeTabs, Boolean IsNewPortal) at DotNetNuke.Entities.Portals.PortalController.ParseTemplate(Int32 PortalId, String TemplatePath, String TemplateFile, Int32 AdministratorId, PortalTemplateModuleAction mergeTabs, Boolean IsNewPortal) at DotNetNuke.Entities.Portals.PortalController.CreatePortal(String PortalName, UserInfo objAdminUser, String Description, String KeyWords, String TemplatePath, String TemplateFile, String HomeDirectory, String PortalAlias, String ServerPath, String ChildPath, Boolean IsChildPortal)
Now the behavior is, it seemed to have written data to the portals table but failed before the portal alias record was written.
I have tried copying the templates from the install package as i found in another post (
http://www.dotnetnuke.com/Resources/F...
) but that did not work.
Since it looks like it may be a problem with the table structure (or atleast that LOOKS like what the error is to me), i checked the table structure for portal and portalalias, comparing them with a Fresh DNN 6 installation, we have they are identically. Also confirmed the parameters in addportalalias are the same. Looked at the code behind the stored procedure, but it looks pretty lite, it is basically just an insert, and the params line up so i dont think the problem is there.
I posted a bump earlier on this forum thread
http://www.dotnetnuke.com/Resources/F..., but that thread seems to be dead, just a statement of the problem and a few bumps (one being mine).
If anyone has any suggestions on how i can go about troubleshooting this I really would appreciate.
Again the upgrade was from DNN community version 6.0.2 from DNN 5.6