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 ExtensionsModulesModulesCustom Module Code Not RunningCustom Module Code Not Running
Previous
 
Next
New Post
11/8/2011 8:35 PM
 
I am going to start by saying that I am fairly new to the development of DNN modules so if I am going about something the wrong way please let me know the better way to go about this.

In short -  I have a custom module that consists of an ASCX file with a CodeFile. I can get it so that the ASCX file itself displays but none of the code in the CodeFile seems to run. For example I have a label on the ASCX file and I tried updating the text of the label in the Page Load event with no luck. When I debug the symbols seem to load (break point fills solid) but breakpoints are never hit. 

One thing to note is that I am actually trying to upgrade an existing module where we seem to have lost the code. A former coworker of mine "reverse engineered" the missing code which is now what I am working with. What I did was overwrite all of the old ASCX files and am updating the .vb CodeFiles for the new logic and the ASCX files to use the new .vb CodeFiles  and then  rebuilding the site in Visual Studio. This seems to have no effect on the behavior of the module. 

Most of the tutorials I have found on this have a very similar setup to what I am doing - ASCX files with .VB or .CS CodeFiles in the same folder and then additional code files in a subfolder of the App_Code folder - so I am not sure what it is I am doing differently that isn't working out for me.

Several questions come to mind
  1. Am I missing any steps as far as how to properly update the back end code of an existing module?
  2. Would it perhaps be better to delete this existing module altogether and treat this as a new module instead?
  3. Am I perhaps missing something in the web.config file? (I did add a codeSubDirectories entry just in case...)
Anything else anyone can think of? I'd be glad to clarify on anything if anyone needs it. As I said I'm new to the DNN world so any suggestions and/or criticisms are welcome. (Running DNN 5 incase anyone needed to know)

Thanks!
 
New Post
11/9/2011 12:30 PM
 
So I went ahead and created a new module using the same code and when I went to add the new module to the page I made the discovery that errors only show up in edit mode of the page.

This is the error I received - researching it didn't pull up much. All I know is there is something wrong with the ActionBase.Page_Load meaning I'm probably missing something in my ASCX class or something.

An error has occurred.
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.UI.Modules.ModuleInstanceContext.LoadActions(HttpRequest Request) at DotNetNuke.UI.Modules.ModuleInstanceContext.get_Actions() at DotNetNuke.UI.Containers.ActionBase.Page_Load(Object sender, EventArgs e) --- End of inner exception stack trace ---


Anyone have any ideas?
 
New Post
11/10/2011 11:17 AM
 
Figured it all out which it turns out was due to poor programming.

The error was caused by not properly implementing DotNetNuke.Entities.Modules.IActionable.ModuleActions on the ModuleActions() property of my user control. Though after fixing this my code did not run - more specifically just my page load event was not running.

Needless to say, turns out the programmer who reverse engineered the existing module did not wire up the event at all and thats why the code wasn't running. I'm kind of embarrassed I did not find it sooner but at least I figured it out. Now I just have to figure out what else he didn't reverse engineer very well....

Thank you!
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesCustom Module Code Not RunningCustom Module Code Not Running


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.