Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForumForumBug in Forum_PostEdit.ascx.vb thatBug in Forum_PostEdit.ascx.vb that's triggered when clicking "New Thread" link?
Previous
 
Next
New Post
12/12/2008 11:13 AM
 

Hi All,

I've got a 4.4.3 forums module that users started reporting errors for.  They said that when they clicked "new thread" they would get a message saying "add/edit post is currently unavailable."

I looked into it further and determined that the culprit was here, in Forum_PostEdit.ascx.vb (starting on line 374):

                                        For Each trackedThread In trackedThreads
                                                If trackedThread.ThreadID = mParentPostInfo.ThreadID Then
                                                    blnTrackedThread = True
                                                    Exit For
                                                End If
                                        Next

The problem is that for a new thread, mParentPostInfo is going to be Nothing (null).  So a NullReferenceException gets thrown when you try to inspect the ThreadId property of that object.

I fixed this by changing that block of code to the following:

                                        For Each trackedThread In trackedThreads
                                            ' Added the outer if statement that checks for a null mParentPostInfo
                                            ' object.  Otherwise we could get null reference exceptions.
                                            If Not mParentPostInfo Is Nothing Then
                                                If trackedThread.ThreadID = mParentPostInfo.ThreadID Then
                                                    blnTrackedThread = True
                                                    Exit For
                                                End If
                                            End If
                                        Next

Is this a genuine bug or is there some other issue that's causing this problem in my installation?

  -Josh

 
New Post
12/12/2008 11:15 AM
 

I just looked in the Documentation/Readme.txt file and it looks like I've actually got 4.4.2, not 4.4.3 as I stated above.  Sorry about the mixup!

 
New Post
12/12/2008 11:18 AM
 

Ok, now I'm uncertain.  The name of the zip file is Forum_04.04.03_Source.zip, but in the Documentation/Readme.txt file it says "Version 04.04.02"... so I'm guessing I've actually got 4.4.3 and the Readme.txt file is wrong?

 
New Post
12/12/2008 3:46 PM
 

This is a valid bug that we (meaning all of the forums users) have been asking to have fixed for a while.  You have the right version.  Documentation is out of date.

This was supposed to be fixed in version 4.4.4 which is not not happening.  Now they are saying verison 4.4.5.  No one has a release date so don't hold your breath.

I do like the code fix above and will try it on my versions.  I have dozens of site with hundreds of unhappy users.  This may help.


Best Regards, Dave VanderWekke
 
New Post
12/18/2008 8:10 AM
 

Thanks for the solution Josh, Im sure the project team will be arround soon to reprimand you for daring to propose a code change to thier code (been there).


"Life's journey is not to arrive at the end safely in a well preserved body, but rather to slide in sideways totally worn out shouting, "holy sh*t...what a ride!"
Dragon's Den
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForumForumBug in Forum_PostEdit.ascx.vb thatBug in Forum_PostEdit.ascx.vb that's triggered when clicking "New Thread" link?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out