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 ForumsEventsEventsCalendar Crashes in List view after logging outCalendar Crashes in List view after logging out
Previous
 
Next
New Post
10/25/2007 5:48 PM
 

Im' using the calendar 3.03.08 on Dnn 4.6.2 and i've used it on separate dnn sites and on both, it installs, ok, lets me add events and then once i logout, it crashes.  I have to log back in and add a new record and it works again. then log out and it crashes.

I'm trying to display the calendar in list view and limit that to be the only view.

here's the crash error when logged out.

An error has occurred.
Error: Calendar is currently unavailable.

 

here's the detailed crash error when i log back in:

Error: Calendar is currently unavailable.
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.Events.SelectCategory.get_SelectedCategory() at DotNetNuke.Modules.Events.EventList.BindDataGrid() at DotNetNuke.Modules.Events.EventList.Page_Load(Object sender, EventArgs e) --- End of inner exception stack trace ---

Any idea what needs to happen to fix this?

Thanks.

 

 

 
New Post
11/1/2007 12:41 PM
 

I am having the same issue with the same versions of the Events module and DNN. The error only seems to occur if "List" is set as the default view. If I click on another view (Month or Week), and then switch back to List view, the error goes away. According to the error details, the error is happening in this section of code of SelectCategory.aspx.vb, but it's not obvious to me what the issue is yet:

#Region "Properties"

        Private _SelectedCategory As String = Nothing
        Public Property SelectedCategory() As String
            Get
                If _SelectedCategory Is Nothing Then
                    If Request.Cookies("DNNEvents")("EventCategory" & ModuleId) Is Nothing Then
                        _SelectedCategory = ""
                    Else
                        Me.SelectedCategory = CType(Request.Cookies("DNNEvents")("EventCategory" & ModuleId), String)
                    End If
                End If
                Return _SelectedCategory
            End Get
            Set(ByVal Value As String)
                Try
                    _SelectedCategory = Value
                    Response.Cookies("DNNEvents")("EventCategory" & ModuleId) = _SelectedCategory
                Catch ex As Exception
                End Try
            End Set
        End Property
#End Region

I will try to debug with the module source and will post back here if I learn anything more, as well as submit a bug report if it is indeed a bug. (It almost has to be.)

Thanks!

 
New Post
11/4/2007 5:58 AM
 

The issue is probably caused by the way the selected event category is stored as cookie. If you don't use categories, you can disable category select as a workaround (in the settings of the module instance).

A code fix has been published by Dan Slage in thread Events Module 03.03.08 Beta, but I haven't tried it yet.

 
New Post
11/7/2007 10:31 AM
 

Dan Slage's fix only somewhat resolves the issue, at least for me. It gets rid of the error showing, but doesn't exactly get list view working as it should.

Seems like a lot of people like to use list view as default and would like to see this bug fixed... *ahem* jus' sayin'.

 
New Post
11/7/2007 12:15 PM
 

Ok... I think I may have finally found a fix for this, although I can't exactly replicate the problem I have been having.

In Dan Slage's fix, he has the following:

            Get
                If _SelectedCategory Is Nothing Then
                    Dim objCookie As HttpCookie = Request.Cookies("DNNEvents")
                    If objCookie Is Nothing Then
                        _SelectedCategory = ""
                    Else
                        Me.SelectedCategory = objCookie.Values("Cat" & ModuleId.ToString)
                    End If
                End If
                Return _SelectedCategory
            End Get

The problem is that sometimes objCookie.Values("Cat" & ModuleId.ToString) was returning Nothing, and thus returning _SelectedCategory as Nothing. This cause the events list to be 0 length, and, in the calendar view for me, the events wouldn't show up (because it found no events in category Nothing).

To "fix" it I changed it to this:

        Get
                If _SelectedCategory Is Nothing Then
                    Dim objCookie As HttpCookie = Request.Cookies("DNNEvents")
                    If objCookie Is Nothing Then
                        _SelectedCategory = ""
                    Else
                        Me.SelectedCategory = objCookie.Values("Cat" & ModuleId.ToString)
                        If _SelectedCategory Is Nothing Then
                            _SelectedCategory = ""
                        End If
                    End If
                End If
                Return _SelectedCategory
            End Get

That way if _SelectedCategory is STILL Nothing after looking for the cookie, it will be set to an empty string. However, once I added those three lines, the offending line (Me.SelectedCategory = objCookie.Values("Cat" & ModuleId.ToString)) is returning an empty string instead of Nothing... even after I delete all of my cookies in IE. So my fix isn't really doing anything now, but theoretically if Me.SelectedCategory is set to Nothing again, _SelectedCategory well be set to an empty string.

The real crux here is that somehow ModuleId is returning -1 instead of my real module id. Don't know how that is happening, but it is and it seems to be the REAL culprit here.

Hopefully this helps out all of you who have access to the source code to fix it.

 

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsEventsEventsCalendar Crashes in List view after logging outCalendar Crashes in List view after logging out


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