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...Upgrading DNN P...Upgrading DNN P...DNN 6.0 modulesettings bug (important)DNN 6.0 modulesettings bug (important)
Previous
 
Next
New Post
8/24/2011 3:27 PM
 
Hello All,

Admin/Modules/modulesettings.ascx.cs has a logical bug that is going to cause people problems and is in fact a disaster waiting to happen for users that ever set startdate / enddate in module settings.

The problem:

As mentioned in this thread: http://www.dotnetnuke.com/Resources/F...
exceptions will occur if anything results in StartDate or EndDate columns of Modules table ever getting set to any date outside the date range 01/01/1980 <--> 12/31/2099.  This is because the module settings control is using the DnnDatePicker (exposing Telrik DatePicker), and the default range of the Telerik DatePicker is the range I just showed.  So invoking the settings on a module with either date in the DB outside the range results in an exception.

But wait, it will get worse:

modulesettings.ascx.cs OnLoad() function contains:
    startDatePicker.MinDate = DateTime.Now;
    endDatePicker.MinDate = DateTime.Now;

so you edit the module settings and set the startdate to today and the enddate to next week, everything okay, (until tomorrow).

Now tomorrow comes and you need to change module permissions or something so you invoke module settings.  Module startdate will now be YESTERDAY and outside valid range and exception will be thrown.

The above 2 lines should be replaced with:
    startDatePicker.MinDate = DateTime.MinValue;
    startDatePicker.MinDate = DateTime.MaxValue;

    endDatePicker.MinDate = DateTime.MinValue;
    endDatePicker.MinDate = DateTime.MaxValue;

This insures that the module settings will be able to be invoked at anytime in the future, and furthermore insures that the date range conforms to the .NET System.DateTime struct date range instead of Telerik's chosen default.

I am certainly glad the source to this control was included in the DNN distribution as I would have been going INSANE if I could not debug this.

I do want to say to all the DNN core staff and helpers THANKS, and I do think DNN 6 IS a GREAT Product, GOOD JOB!  - but do please fix this asap
 
New Post
8/24/2011 7:56 PM
 
If you have not already done so - it would  be a good idea to log this issue on support.dotnetnuke.com.

Cheers

Westa
 
New Post
8/24/2011 9:00 PM
 
Oops! See I am as talented as ANYONE at enbugging programs!

In my 1st post I copied and pasted without editing properly, my proposed changes to modulesettings.ascx.cs SHOULD have been:

startDatePicker.MinDate = DateTime.Now;
endDatePicker.MinDate = DateTime.Now;

 should be replaced with:

    startDatePicker.MinDate = DateTime.MinValue;
    startDatePicker.MaxDate = DateTime.MaxValue;

    endDatePicker.MinDate = DateTime.MinValue;
    endDatePicker.MaxDate = DateTime.MaxValue;

(Thx Richard!)

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Upgrading DNN P...Upgrading DNN P...DNN 6.0 modulesettings bug (important)DNN 6.0 modulesettings bug (important)


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