bug in ForumThread.cs

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
2/3/2012 9:13:23 AM
Gravatar
Total Posts 5

bug in ForumThread.cs

It seems few people are using sql compact edition. Here might be another bug.

version: 2.3.8.1

file: ForumThread.cs

line: 283-290

                    if (reader["ForumID"] != DBNull.Value)                     {                         this.forumID = this.origForumID = int.Parse(reader["ForumID"].ToString());                     }                     if (reader["ModuleID"] != DBNull.Value)                     {                         this.moduleID = this.origForumID = int.Parse(reader["ModuleID"].ToString());                     }

 

The code on line 289 seems copied from line 285, but this.origForumID should not be asigned I guess. Actually I debugged to here to find wrong origForumID value.

Regards,

Weijun

2/3/2012 12:04:54 PM
Gravatar
Total Posts 18439

Re: bug in ForumThread.cs

Hi Weijun,

This does appear to be a minor bug, but it is not in the data layer so it is not specific to SQL CE.

The origForumID is used only when moving a forum thread from one forum to another, in that case we need to keep track of the original forum id so that we can re-index it in the search index. So the consequence of this bug is possibly that if you moved a thread from one forum to another it would still show up as a search result in the original forum (in addition to the new one) since the vlaue was getting set incorrectly the original forum was not getting re-indexed.

This is a minor bug that has apprently been there a long time, but it is fixed now in the source code repository.

Thanks,

Joe

2/6/2012 4:29:07 AM
Gravatar
Total Posts 5

Re: bug in ForumThread.cs

Hi Joe,

I checked out ForumThread.cs using TortoiseHg, but it is still unchanged now.

Thanks

Weijun

2/6/2012 7:32:18 AM
Gravatar
Total Posts 18439

Re: bug in ForumThread.cs

After you pull changesets you need to do TortoiseHG > Update to update your working copy with the changes. Make sure you are updating to the default branch.

Hope that helps,

Joe

You must sign in to post in the forums. This thread is closed to new posts.