I am developing a separate project with all my code in it for 2 reasons: to avoid changing CS code, & because the CS site that was already there was already compiled & I didn't want to remake in a source code solution all that the compiled site had. Everything was going fine until my boss *required* me to use a source version of CS, replicate everything in the compiled version of the site, & continue working on the source version. I did this, got everything copied over, but ran into a strange problem. Once of the controls I made in C# is an AddForum form, as the site needed to allow end users to create forums within forums, & the only place I knew that forums could be created is in the control panel, which my boss didn't want end users to have access to. In the compiled version of the site, I am able to create a forum, store it to the DB, then create 2 threads/posts, & store them as well. In the source version of my site, I get a Forum Not Found error when trying to add the threads/posts to the newly created & saved forum. I've stepped through the code as much as I could, & run into the problem that the forums that are being returned to AddPost() are being pulled from the cache, which doesn't have the new forum in it. Here's the kicker: the new forum doesn't exist in the cache even *after* calling GetForums() such that it flushes the cache & rebuilds it.
I'm not sure what I'm missing, but something is bizzare, in that the source that supposedly creates the same binaries as the compiled version of the site DOESN'T work, while the (pre-)compiled site does. <sigh>
Oh yeah, I'm working with CS 2007 on an XP Pro dev box using IIS & IE7.
Are the compiled version and SDK version you're using the same. If not, I suspect you'll have a more recent version of the SDK than your main database so you'll need to upgrade your database to match the version of the SDK.
Community Server Documentation please rate articles you read
Nintendo Wiikly | My Blog
The way the project started, my boss installed a compiled version of CS2007. I'm not sure from where, but he's repeatedly said it was from the CS site itself. Anyway, after much pestering for another project, he got me the CS2007 SDK (took a while for Telligent to get it to us once 2008 came out), which is the version of the SDK I'm using to be able to debug the site. After I copied the SDK files & made a virtual root, I copied the compiled version's config files, so this source version is pointing at the same DB. When I stepped through the source code to find out why the forum was never found, it was because the GetForumsTable() method checks the cache 1st, & if it's found, returns the cache's list of forums -- not the forums in the DB. I can see the forum is being created in the DB, but the cache isn't being updated. When I looked at the way the control panel's add forum page creates forums, once the DB is updated, the CS source has a call to Forums.GetForums(), with a note from the Telligent developers that there was a bug, & the only way to update the cache is to call that method. My replication of the process includes this call, but for some reason, the cache never gets the new forum.
Sorry, had to get that out, as it's a frustration that hasn't left yet.
So, how do I find out which version of the SDK, compiled site, & DB I'm using? I've seen that question on the forums here at dev.communityserver.com, but never seen the way to find that out.
Thanks!
- O8
I suppose the best way to check if your SDK and compiled version of the site were the same version would be if you still have the compiled binaries, check the version numbers on those and compare them to the version numbers of the new binaries.
Copyright© 2008 Telligent Systems Inc. All rights reserved CommunityServer.com • Telligent.com