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 ForumsForumForuma Bug i think.. a Bug i think..
Previous
 
Next
New Post
4/29/2009 12:41 AM
 

 

I just noticed that I had a problem posting new threads using my account..  On my DNN site which is 04.09.03 running forums version 04.04.03

After a some of debugging I found the problem to be nocode in handling the Post action of  New.. with tracking turned off.. If I turn tracking on it will go away however because tracking is off and it is a new thread the mparentPostInfo is null and will bomb with a null reference exception..   What I find strange is that I am the only one having this problem??    Included is  the code snippet of my fix which may make it back into the community version.

 from Forum_PostEdit.ascx.vb onPageLoad Event around line 350

 If (Not blnTrackedForum) Then

            Dim blnTrackedThread As Boolean = False

            ' Forum is NOT already being tracked, possibly show user the option to subscribe

            ' we need to check the case to see how to handle tracking at the thread level

            Select Case mAction

                Case PostAction.New

                    'do nothing we don’t New Code

                Case PostAction.Edit

                    ' user may already be tracking the thread

                    ' we may not have threadID, we definately have postid

                    Dim trackedThreads As ArrayList = mUser.TrackedThreads

                    Dim trackedThread As TrackingInfo

 

                    For Each trackedThread In trackedThreads

                        If trackedThread.ThreadID = mParentPostInfo.ThreadID Then

                            blnTrackedThread = True

                            Exit For

                        End If

                    Next

                Case Else ' reply/quote

                    ' user may already be tracking the thread

                    ' we may not have threadID, we definately have postid

                    Dim trackedThreads As ArrayList = mUser.TrackedThreads

                    Dim trackedThread As TrackingInfo

 

                    For Each trackedThread In trackedThreads

                        If trackedThread.ThreadID = mParentPostInfo.ThreadID Then ‘ here is the null ref

                            blnTrackedThread = True

                            Exit For

                        End If

                    Next

            End Select

 
New Post
4/29/2009 2:49 PM
 

I don't agree with you on this issue, but maybe your issue is caused by an IIS timeout when posting to the forum, which is already corrected in next Forums version. 

It would be helpful for us, if you report the issue with detailed description and steps to reproduce, as well as error details from the event log.

Thanks.

 
New Post
5/5/2009 5:43 PM
 

Thanks for looking into it for me. Sorry for the late reply I am only working on this project part time..

 
I don’t  think it  related to IIS timeout as I can reproduce it with ease with IIS running.
 
Here is a little more detail:
 
1)      I am using the Host Admin account when this happens.
2)      I have to have disable default tracking on the forum of interest
3)      In the user for the admin I have to disable tracking in the forums I an trying to post to.
4)      I am posting a new thread.
 
With the above setup we should get to the Block of code posted above.
 
Now here is what I was trying to say last time  unsuccessfully was basically the block of code can deal with actions “Edit” , “Quote” and “Reply” with no problem however there is not code to deal with the Action “New”
 
 The codes to deal with Edit works work fine all other actions are assumed to be a quote or reply.. in which case it correctly goes and get the parent post info to determine the tracking.. however in the case above the parent is null as it is a new thread hence it results in the null exception below.  I there is a need to put a switch in for the action “New”
 
The Exception from the log is as follows:
 
 
 
ModuleId: 378
ModuleDefId: 103
FriendlyName: Add/Edit Post
ModuleControlSource: DesktopModules/Forum/Forum_PostEdit.ascx
AssemblyVersion: 04.09.03
PortalID: 1
PortalName: Swim Bike Run
UserID: 1
UserName: KevinBosch
ActiveTabID: 57
ActiveTabName: Forums
RawURL: /Forums/tabid/57/ctl/PostEdit/forumid/3/action/new/mid/378/Default.aspx
AbsoluteURL: /Default.aspx
AbsoluteURLReferrer: http://www.swimbikerun.net.nz/Forums/tabid/57/forumid/3/scope/threads/Default.aspx
UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; InfoPath.1; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID: f1d2f41f-88eb-46e9-ab1c-8774826456ef
InnerException: Object reference not set to an instance of an object.
FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method: DotNetNuke.Modules.Forum.PostEdit.Page_Load
StackTrace:
Message: DotNetNuke.Services.Exceptions.ModuleLoadException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object. at DotNetNuke.Modules.Forum.PostEdit.Page_Load(Object sender, EventArgs e) --- End of inner exception stack trace ---
Source:
Server Name: RAVIN-U4G

 

 
 
 
Again thanks for looking at this.
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForumForuma Bug i think.. a Bug i think..


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