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

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...4.5.3 Upgrade to 4.5.5 -- Profile/User Errors - Downgraded4.5.3 Upgrade to 4.5.5 -- Profile/User Errors - Downgraded
Previous
 
Next
New Post
8/16/2007 7:00 PM
 

JGS DNN Fan wrote

Message: DotNetNuke.Services.Exceptions.PageLoadException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object. at DotNetNuke.UI.WebControls.DateEditControl.get_Format() at DotNetNuke.UI.WebControls.DateEditControl.get_StringValue() at DotNetNuke.UI.WebControls.DateEditControl.OnPreRender(EventArgs e) at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace ---

I am trying to get these profile "bugs" sorted out for 4.6.0.

I cannot reproduce this on a new install - essentailly 4.5.5 with respect to this error.  In particular I am somewhat baffled by the error.  It states that it is an Object refernce error in the get method of the Format property, which was introduced in 4.5.4 to provide more control over the display of the Date.

Here is the code:

        Protected Overridable ReadOnly Property Format() As String
            Get
                Dim _Format As String = DefaultFormat
                If CustomAttributes IsNot Nothing Then
                    For Each attribute As System.Attribute In CustomAttributes
                        If TypeOf attribute Is FormatAttribute Then
                            Dim formatAtt As FormatAttribute = CType(attribute, FormatAttribute)
                            _Format = formatAtt.Format
                            Exit For
                        End If
                    Next
                End If
                Return _Format
            End Get
        End Property

and

        Protected Overridable ReadOnly Property DefaultFormat() As String
            Get
                Return "d"
            End Get
        End Property

I cannot see under what condition this would throw an null refernce error.

Any ideas?

 

 

 


Charles Nurse
Chief Architect
Evoq Content Team Lead,
DNN Corp.

Want to contribute to the Platform project? - See here
MVP (ASP.NET) and
ASPInsiders Member
View my profile on LinkedIn
 
New Post
8/16/2007 8:23 PM
 

Charles;

I responded to your post on the Gemini ticketing system:

http://support.dotnetnuke.com/issue/ViewIssue.aspx?ID=5974

Don't let this one slip away from the radar.  It's a REAL problem.

 Jud

 

 
New Post
8/17/2007 8:53 PM
 

After some give-n-take with Charles, it's my belief that this issue will be downgraded as "not reproduceable" because Charles has determined the error does not occur in the new v4.6.0 code (or even with a fresh install of V4.5.5). You can see our latest (and probably last) exchange here in the Gemini ticketing system: 

http://support.dotnetnuke.com/issue/ViewIssue.aspx?ID=5974

If any of you have any further insight into the matter, have at it.  There's no more I can provide to prove there's a real problem.

 Jud

 

 
New Post
8/26/2007 10:10 PM
 

I can verify that the problem definitely happens with a fresh install or with an upgraded site.  I have upgraded from 4.xx thru  to 4.5.5 and just now noticed the problem.  It caught me completely by surprise, and took me a while to figure out what was causing the null reference.  It happens whenever you add a profile property that has either a date or a datetime datatype.  Remove any date and datetime datatype properties from the ProfilePropertyDefinition and the error goes away.  Happens in both the fresh install and the upgraded sites.  The error appears to happen (according to the event log) when the Method: DotNetNuke.UI.WebControls.DateEditControl.get_Format()  is called, and since I don't yet understand how that method even exists since it is not in the DateEditControl.vb file, I am at a loss to explain how it gets called.  A search of the source code does not find any such string as get_Format anywhere, so how it gets called is currently beyond my understanding.  Maybe someone can enlighten me?


Gene W
 
New Post
8/28/2007 1:17 AM
 
Hi,

I think it's a versioning thing. I've got a 4.5.5 source install and the Format() routine is missing the IsNot Nothing check on CustomAttributes:

Protected Overridable ReadOnly Property Format() As String
Get
Dim _Format As String = DefaultFormat
For Each attribute As System.Attribute In CustomAttributes
If TypeOf attribute Is FormatAttribute Then
Dim formatAtt As FormatAttribute = CType(attribute, FormatAttribute)
_Format = formatAtt.Format
Exit For
End If
Next
Return _Format
End Get
End Property

Adding the "If CustomAttributes IsNot Nothing Then" (as indicated in Charles') post to the above routine and recompiling fixes the problem.

Hope this helps!


Shawn


 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...4.5.3 Upgrade to 4.5.5 -- Profile/User Errors - Downgraded4.5.3 Upgrade to 4.5.5 -- Profile/User Errors - Downgraded


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