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 ExtensionsModulesModulesWhen Update ControlKey, CanWhen Update ControlKey, Can't Load Module
Previous
 
Next
New Post
4/25/2011 2:30 PM
 
I add a new module definition and can add it to a page successfully. But if I go in and simply add a value for the Key...I get the following error. Any ideas why?

ModuleId: -1
ModuleDefId: -1
FriendlyName
ModuleControlSource
AssemblyVersion: 5.6.2
PortalID: 0
PortalName: TheDynoRoom.com
UserID: 29
UserName: chad1
ActiveTabID: 485
ActiveTabName: test
RawURL: /test/tabid/485/portalid/0/Default.aspx
AbsoluteURL: /Default.aspx
AbsoluteURLReferrer: http://dnn_dev/test/tabid/485/portalid/0/Default.aspx
UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.50 Safari/534.24
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID: a0130ae2-2c6c-404d-b219-8baf2b8b11b5
InnerException: Object reference not set to an instance of an object.
FileName
FileLineNumber: 0
FileColumnNumber: 0
Method: DotNetNuke.Entities.Modules.ModuleController.AddModule
StackTrace
Message: 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.Entities.Modules.ModuleController.AddModule(ModuleInfo objModule) at DotNetNuke.UI.ControlPanels.ControlPanelBase.AddNewModule(String title, Int32 desktopModuleId, String paneName, Int32 position, ViewPermissionType permissionType, String align) at DotNetNuke.UI.ControlPanels.IconBar.AddModule_Click(Object sender, EventArgs e) in C:\Users\Chad\Documents\Incite Systems\Development\Web Sites\DNN_DEV\Admin\ControlPanel\IconBar.ascx.vb:line 500 --- End of inner exception stack trace ---
 
New Post
4/25/2011 7:52 PM
 
Please explain in more detail what you mean by "But if I go in and simply add a value for the Key".

For each module definition there must be one and only one module control which has an empty ControlKey. That module control is considered to be the default control for the definition and wil be the one displayed when browsing to a page containing the module and the parameter "ctl=" is not present in the URL's query string. All of the other module controls of a module definition must have unique (to that definition) ControlKeys.

Usually, if one of the module controls does not have an empty key, the module will not be displayed on the page that it has been added to and no error will be thrown.


Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
New Post
4/25/2011 9:31 PM
 
Bill, I really appreciate your reply. This problem was a by-product of the other post that you just responded to (http://www.dotnetnuke.com/Resources/Forums/tabid/795/forumid/203/threadid/416289/scope/posts/Default.aspx) in which I am trying to navigate from one page to the next. So I was testing simply changing the module definition of a control and adding a control key. So the error was related to then navigating to a page with that module on it, but there were no controls that had an empty control key as there is only one control and I gave it a control key value.

I did also experience the issue you mention about "Usually, if one of the module controls does not have an empty key, the module will not be displayed on the page that it has been added to and no error will be thrown."

This clarifies for me the restrictions on use of the control key in a module definition.

Thanks,
Chad
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesWhen Update ControlKey, CanWhen Update ControlKey, Can't Load 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