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

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesUpgraded to DNN 5.4.1 and now nullable dates will not work with my custom moduleUpgraded to DNN 5.4.1 and now nullable dates will not work with my custom module
Previous
 
Next
New Post
4/28/2010 6:01 PM
 

I've just upgraded to DNN 5.4.1 and my custom module is now broken. I receive the following error:

A critical error has occurred.
Invalid cast from 'System.DateTime' to 'System#Nullable`1##System#DateTime, mscorlib, Version=2#0#0#0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]'.

My custom module is using an info class with a nullable DateTime field, which is supposed to get hydrated using the CBO.FillCollection method from a controller class. This worked in the previous version, but now, after the upgrade, I'm receiving these cast errors.

Am I doing something wrong here or is this some kind of bug?

 
New Post
4/29/2010 1:09 AM
 

 No it's not just you, something changed.  My modules with this are breaking.

 
New Post
5/4/2010 2:20 PM
 
I have exactly the same error in one of my custom modules. I upgraded from 5.3.1. to 5.4.1. this morning. It looks like I'll have to roll back at least for the time being. If someone has a solution, please post it to this board. Thank you!
 
New Post
5/4/2010 7:45 PM
 
I have a workaround for this issue - but it's requires a little recoding.

Your "Info" class (Business Object) should be upgraded to implement DotNetNuke.Entities.Modules.IHydratable

In the fill method - you can handle the population of the object properties from the passed in DataReader;

e.g.   

if (dr[7] != DBNull.Value)
     mDateTo = (DateTime)dr[7];
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesUpgraded to DNN 5.4.1 and now nullable dates will not work with my custom moduleUpgraded to DNN 5.4.1 and now nullable dates will not work with my custom module


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