I'm excited about the official release of 2007, but not sure how to upgrade my existing 2.1 site to 2007. From what I can tell, the 2007 installation is only designed to create a new community, not upgrade an existing (2.1) community. I'm hoping an article "Upgrading from Community Server 2.1 to Community Server 2007" will be written similar to these.
Thanks in advance for any pointers!
In the download for CS2007 (The web installer) there will be a subdirectory in the "sqlscripts" directory called "upgrade from previous versions" or something to that effect. Here in this directory you will find appropriate SQL scripts to run on your existing database to upgrade it. In your case cs_2.x_to_cs_3.0_upgrade.sql is the appropriate script for you.
1) Now be sure to back up your database first as well as your CS2.1 files in case something goes a rye in your upgrade. Also I have found it helpful to refer back to the old files to refer to any custom content parts (things you double click to edit), etc... you may have added in CS2.1. It will become apparent why this is helpful below.
2) After you back everything up run the script mentioned above on your database. Once that script is complete copy and paste the CS2007 files over your cs2.1 installation... overwriting files when asked. (simply overwrite all is fine here)
3) Update your connection string to your database. No longer is it found in the web.config and instead it has it's own little file called... ConnectionStrings.config. Having backed up your old files you can refer back to your old web.config to get this if you are like me and tend to forget what it is.
4) Once you have updated your connection string then when you visit your site it should be upgraded to CS2007. Warning though as the theming engine in CS2007 is different (and much better) than that of CS2.1. Hence if you designed a custom look for CS2.1 on your website it won't translate over like in other versions.
If you created custom content parts, other than the generic one on the home page, in your CS2.1 site this brings me to my point earlier about backing up the old files to refer to any custom content parts, etc... you created. Those items you created on your site in CS2.1 remain in the database but aren't yet reflected on your pages as the theming engine is different... hence they don't show up on your site until you edit your theme to make them appear. I'll spare you the details of the theming engine for now but if you didn't make any customizations to CS2.1 you don't worry about it.
In summary...
Regarding Step #2. Won't a straight copy/overwrite leave some unnecessary CS 2.1 files? Would it be cleaner to delete files first and then copy? Thanks.
Hi,
Yes it would be, but the risk of deleting something that CS 2.1 has created on the file system that you should not may be greater than the benefits.
Regards
Dave
Dave Stokes:Hi, Yes it would be, but the risk of deleting something that CS 2.1 has created on the file system that you should not may be greater than the benefits. Regards Dave
Yes... my sentiments exactly. As a novice with CS I find it best not to delete anything I'm not 100% sure I don't need. Hence if a few extra files find their way on my site then so be it. Rather have an unneeded file as opposed to not having a file I need.
Thanks Tom, this is outstanding! Doesn't seem so daunting now that you've so clearly explained it. I'll give it a shot tonight!
Arthur Dent:Thanks Tom, this is outstanding! Doesn't seem so daunting now that you've so clearly explained it. I'll give it a shot tonight!
Glad to hear it... remember if I can do it anyone can do it!
Thank you Tommyweather for your help.
I am having a problem however. After running the upgrade script, and copying the files across I now get this exception:
Server Error in '/forum' Application. Specified cast is not valid. 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.InvalidCastException: Specified cast is not valid. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [InvalidCastException: Specified cast is not valid.] CommunityServer.Components.CommonDataProvider.PopulateUserFromIDataReader(IDataReader dr, Boolean isEditable, Boolean includeAudit) +116 CommunityServer.Components.CommonDataProvider.cs_PopulateUserFromIDataReader(IDataReader dr, Boolean isEditable) +13 CommunityServer.Data.SqlCommonDataProvider.GetUser(Int32 userID, String username, Boolean isOnline, Boolean isEditable, String lastAction) +397 CommunityServer.Users.GetUserFromDataProvider(Int32 userID, String username, Boolean isOnline, Boolean isEditable, String lastAction) +39 CommunityServer.Users.GetUser(Int32 userID, String username, Boolean isOnline, Boolean isCacheable, Boolean fromCache) +1196 CommunityServer.Components.CSContext.get_User() +63 CommunityServer.Components.CSLocation.ThemePage(ReWrittenUrl url) +38 CommunityServer.Urls.Location.GetReWrittenUrl(ReWrittenUrl url, String path, String queryString) +13 CommunityServer.Urls.Location.GetReWrittenUrl(HttpContext context, String path, String queryString) +143 CommunityServer.Urls.UrlReWriteProvider.GetRewrittenUrl(HttpContext context) +140 CommunityServer.CSHttpModule.ReWriteUrl(HttpContext context) +23 CommunityServer.Components.CSContext.ExecuteUrlReWrite() +23 CommunityServer.CSHttpModule.Application_AuthorizeRequest(Object source, EventArgs e) +123 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
[InvalidCastException: Specified cast is not valid.] CommunityServer.Components.CommonDataProvider.PopulateUserFromIDataReader(IDataReader dr, Boolean isEditable, Boolean includeAudit) +116 CommunityServer.Components.CommonDataProvider.cs_PopulateUserFromIDataReader(IDataReader dr, Boolean isEditable) +13 CommunityServer.Data.SqlCommonDataProvider.GetUser(Int32 userID, String username, Boolean isOnline, Boolean isEditable, String lastAction) +397 CommunityServer.Users.GetUserFromDataProvider(Int32 userID, String username, Boolean isOnline, Boolean isEditable, String lastAction) +39 CommunityServer.Users.GetUser(Int32 userID, String username, Boolean isOnline, Boolean isCacheable, Boolean fromCache) +1196 CommunityServer.Components.CSContext.get_User() +63 CommunityServer.Components.CSLocation.ThemePage(ReWrittenUrl url) +38 CommunityServer.Urls.Location.GetReWrittenUrl(ReWrittenUrl url, String path, String queryString) +13 CommunityServer.Urls.Location.GetReWrittenUrl(HttpContext context, String path, String queryString) +143 CommunityServer.Urls.UrlReWriteProvider.GetRewrittenUrl(HttpContext context) +140 CommunityServer.CSHttpModule.ReWriteUrl(HttpContext context) +23 CommunityServer.Components.CSContext.ExecuteUrlReWrite() +23 CommunityServer.CSHttpModule.Application_AuthorizeRequest(Object source, EventArgs e) +123 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64
Do you know what could be wrong?
Thanks in advance.
Hmmm.... I'm not sure. Let me contact someone to look into this further for you. You ran the appropriate script as well as copying the new CS2007 files correct? Did you mistakenly copy back the web.config and communityserver.config files back over your CS2007 files? Have you tried restoring the backup of your database and files and running the script again to see if you can duplicate the problem? Do you have any custom CSmodules running on your site?
Will my 2.1 License file work with 2007?
No. You will a new license file.
I tried test update today, but I get this error message:
You must specify a non-autogenerated machine key to store passwords in the encrypted format. Either specify a different passwordFormat, or change the machineKey configuration to use a non-autogenerated decryption key.
I'm not sure from where I can fix this problem. Help! Thanks!
jasperjugan: I tried test update today, but I get this error message: You must specify a non-autogenerated machine key to store passwords in the encrypted format. Either specify a different passwordFormat, or change the machineKey configuration to use a non-autogenerated decryption key. I'm not sure from where I can fix this problem. Help! Thanks!
by the way, this problem is raised whenever I try to login.
Hi Tommy... Yes to all of the above. Simply ran the update script, successfully and copied all the 2007 files across on top and all went successfully. I am going to re-do the above and see if I have any luck. If you have any further suggestions please let me know.
Thanks
Hi Tommy
After trying to redo the installation, (I'm using GoDaddy hosting) and on running the 'cs_2.x_to_3.0_upgrade.sql' query through Go Daddy's query analyser I get this error (I could've sworn it ran right the first time):
Line 1: Incorrect syntax near 'BEGIN'.
SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGO--Update Apple release databases to Johnny... Use the 01 patch as a template this--one has special prerequisite handlingDECLARE @Major int, @Minor int, @Patch int, @Installed DateTime, @Prereqs intSet @Major = 2;Set @Minor = 1;Set @Patch = 0;Select @Prereqs = isnull(Count(InstallDate),0) from cs_SchemaVersion where Major=2 and Minor=0 and Patch<58Select @Installed = InstallDate from cs_SchemaVersion where Major=@Major and Minor=@Minor and Patch=@PatchIf(@Installed is null AND @Prereqs = 57) BEGIN--## Schema Patch ##--All we are doing is updating the schema revision--## END Schema Patch ##Insert into cs_SchemaVersion(Major, Minor, Patch, InstallDate) values (@Major, @Minor, @Patch, GetDate())
and so on...
Any idea why I'm getting my sql error?
Copyright© 2008 Telligent Systems Inc. All rights reserved CommunityServer.com • Telligent.com