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 ExtensionsModulesModulesAdd module to page raise errorAdd module to page raise error
Previous
 
Next
New Post
2/6/2012 6:37 AM
 

HI,


I have created custome module, It install succesfully, When i try to add module to page it raise error in here

Here is error details

at DotNetNuke.Entities.Modules.ModuleController.AddModule(ModuleInfo module)
   at DotNetNuke.UI.ControlPanel.AddModule.DoAddNewModule(String title, Int32 desktopModuleId, String paneName, Int32 position, Int32 permissionType, String align) in e:\Arruni\Arruni\Rami-Dnn\Dnn\admin\ControlPanel\AddModule.ascx.cs:line 723
   at DotNetNuke.UI.ControlPanel.AddModule.CmdAddModuleClick(Object sender, EventArgs e) in e:\Arruni\Arruni\Rami-Dnn\Dnn\admin\ControlPanel\AddModule.ascx.cs:line 247
   at System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e)
   at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument)
   at System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
   at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
   at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

This is my .dnn file

<dotnetnuke type="Package" version="5.0">
  <packages><package name="Charity" type="Module" version="1.0.0">
  <friendlyName>Charity</friendlyName>
  <description />
  <iconFile />
  <owner>
    <name />
    <organization />
    <url />
    <email />
  </owner>
  <license>The license for this package is not currently included within the installation file, please check with the vendor for full license details.</license>
  <releaseNotes>This package has no Release Notes</releaseNotes>
  <components>
    <component type="Script">
      <scripts>
        <basePath>DesktopModules\Charity</basePath>
        <script type="Install">
          <name>01.00.00.SqlDataProvider</name>
          <version>01.00.00</version>
        </script>
        <script type="UnInstall">
          <name>Uninstall.SqlDataProvider</name>
          <version>1.0.0</version>
        </script>
      </scripts>
    </component>
    <component type="Module">
      <desktopModule>
        <moduleName>Charity</moduleName>
        <foldername>Charity</foldername>
        <businessControllerClass />
        <supportedFeatures />
        <moduleDefinitions>
          <moduleDefinition>
            <friendlyName>Charity</friendlyName>
            <defaultCacheTime>0</defaultCacheTime>
            <moduleControls>
              <moduleControl>
                <controlKey>Edit</controlKey>
                <controlSrc>DesktopModules/Charity/EditCharity.ascx</controlSrc>
                <supportsPartialRendering>False</supportsPartialRendering>
                <controlTitle />
                <controlType>Edit</controlType>
                <iconFile />
                <helpUrl />
                <supportsPopUps>False</supportsPopUps>
              </moduleControl>
              <moduleControl>
                <controlKey>Setting</controlKey>
                <controlSrc>DesktopModules/Charity/Settings.ascx</controlSrc>
                <supportsPartialRendering>False</supportsPartialRendering>
                <controlTitle />
                <controlType>Edit</controlType>
                <iconFile />
                <helpUrl />
                <supportsPopUps>False</supportsPopUps>
              </moduleControl>
              <moduleControl>
                <controlKey>View</controlKey>
                <controlSrc>DesktopModules/Charity/ViewCharity.ascx</controlSrc>
                <supportsPartialRendering>False</supportsPartialRendering>
                <controlTitle />
                <controlType>View</controlType>
                <iconFile />
                <helpUrl />
                <supportsPopUps>False</supportsPopUps>
              </moduleControl>
            </moduleControls>
          </moduleDefinition>
          <moduleDefinition>
            <friendlyName>AddCharity</friendlyName>
            <defaultCacheTime>0</defaultCacheTime>
            <moduleControls>
              <moduleControl>
                <controlKey>View</controlKey>
                <controlSrc>DesktopModules/Charity/AddCharity.ascx</controlSrc>
                <supportsPartialRendering>False</supportsPartialRendering>
                <controlTitle />
                <controlType>View</controlType>
                <iconFile />
                <helpUrl />
                <supportsPopUps>False</supportsPopUps>
                <viewOrder>0</viewOrder>
              </moduleControl>
            </moduleControls>
          </moduleDefinition>
          <moduleDefinition>
            <friendlyName>AddCharityEvent</friendlyName>
            <defaultCacheTime>0</defaultCacheTime>
            <moduleControls>
              <moduleControl>
                <controlKey>View</controlKey>
                <controlSrc>DesktopModules/Charity/AddCharityEvent.ascx</controlSrc>
                <supportsPartialRendering>False</supportsPartialRendering>
                <controlTitle />
                <controlType>View</controlType>
                <iconFile />
                <helpUrl />
                <supportsPopUps>False</supportsPopUps>
                <viewOrder>0</viewOrder>
              </moduleControl>
            </moduleControls>
          </moduleDefinition>
          <moduleDefinition>
            <friendlyName>CreateCharityPage</friendlyName>
            <defaultCacheTime>0</defaultCacheTime>
            <moduleControls>
              <moduleControl>
                <controlKey>View</controlKey>
                <controlSrc>DesktopModules/Charity/CreatePage.ascx</controlSrc>
                <supportsPartialRendering>False</supportsPartialRendering>
                <controlTitle />
                <controlType>View</controlType>
                <iconFile />
                <helpUrl />
                <supportsPopUps>False</supportsPopUps>
                <viewOrder>0</viewOrder>
              </moduleControl>
            </moduleControls>
          </moduleDefinition>
          <moduleDefinition>
            <friendlyName>CharityDonation</friendlyName>
            <defaultCacheTime>0</defaultCacheTime>
            <moduleControls>
              <moduleControl>
                <controlKey>View</controlKey>
                <controlSrc>DesktopModules/Charity/Donation.ascx</controlSrc>
                <supportsPartialRendering>False</supportsPartialRendering>
                <controlTitle />
                <controlType>View</controlType>
                <iconFile />
                <helpUrl />
                <supportsPopUps>False</supportsPopUps>
                <viewOrder>0</viewOrder>
              </moduleControl>
            </moduleControls>
          </moduleDefinition>
          <moduleDefinition>
            <friendlyName>ViewCharityEvent</friendlyName>
            <defaultCacheTime>0</defaultCacheTime>
            <moduleControls>
              <moduleControl>
                <controlKey>View</controlKey>
                <controlSrc>DesktopModules/Charity/ViewEvent.ascx</controlSrc>
                <supportsPartialRendering>False</supportsPartialRendering>
                <controlTitle />
                <controlType>View</controlType>
                <iconFile />
                <helpUrl />
                <supportsPopUps>False</supportsPopUps>
                <viewOrder>0</viewOrder>
              </moduleControl>
            </moduleControls>
          </moduleDefinition>
        </moduleDefinitions>
      </desktopModule>
    </component>
    <component type="Assembly">
      <assemblies>
        <basePath>bin</basePath>
        <assembly>
          <name>YourCompany.Modules.Charity.dll</name>
        </assembly>
      </assemblies>
    </component>
    <component type="File">
      <files>
        <basePath>DesktopModules\Charity</basePath>
        <file>
          <path>App_LocalResources</path>
          <name>EditCharity.ascx.resx</name>
        </file>
        <file>
          <path>App_LocalResources</path>
          <name>Settings.ascx.resx</name>
        </file>
        <file>
          <path>App_LocalResources</path>
          <name>ViewCharity.ascx.resx</name>
        </file>
        <file>
          <name>AddCharity.ascx</name>
        </file>
        <file>
          <name>AddCharityEvent.ascx</name>
        </file>
        <file>
          <name>CreatePage.ascx</name>
        </file>
        <file>
          <name>Donation.ascx</name>
        </file>
        <file>
          <name>ViewEvent.ascx</name>
        </file>
        <file>
          <name>web.config</name>
        </file>
        <file>
          <name>web.Debug.config</name>
        </file>
        <file>
          <name>web.Release.config</name>
        </file>
        <file>
          <path>Documentation</path>
          <name>Documentation.css</name>
        </file>
        <file>
          <path>Documentation</path>
          <name>Documentation.html</name>
        </file>
        <file>
          <path>Documentation</path>
          <name>logo.gif</name>
        </file>
        <file>
          <name>EditCharity.ascx</name>
        </file>
        <file>
          <name>Settings.ascx</name>
        </file>
        <file>
          <name>ViewCharity.ascx</name>
        </file>
      </files>
    </component>
  </components>
</package></packages>
</dotnetnuke>



Where is wrong?



 
New Post
2/6/2012 8:49 AM
 

Unfortunately the error details you posted do not show the error that is being logged. Please post the complete error information.

In looking at your dnn manifest file, I'm wondering if you really intended to create multiple module definitions registering one or more module controls rather than one module definition having many module controls.  Also, for a module to show when a page is loaded, one and only one module control within a module definition must have its ControlKey left blank. This is considered the default view control and would most likely be the ViewCharity.ascx control. Although not likely the cause of the error, be sure that the manifest and install package does not include the  web.config, web.Debug.config and web.Release.config configuration files


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
2/6/2012 10:45 AM
 

Here is my error message

Object reference not set to an instance of an object.

My module has few sub module like blog module



 
New Post
2/6/2012 12:52 PM
 

Unfortunately null object reference errors are the most common of unhandled errors and could be coming from almost any part of your module where an instance of an object is not getting properly instantiated before it is referenced in your code. You will most likely need to set a debugging breakpoint in the Init or Load handler of your default view control and step through your initialization code as the module is added to a page.

I have also seen null refernece errors being generated in the core methods that inject a module to a page when the module control does not inherit from PortalModuleBase or otherwise implement IModuleControl interface.

Also, be sure to set your default view control's registration to use a blank ControlKey. Generally, however, that does not cause a null reference or other error as it just prevents the module from showing up on the page.


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
2/7/2012 5:22 AM
 

Hi,

I have delete my control key, Then that error has fixed. Now i can see my modules in my page, But except my main module others show error.

Error: AddCharity is currently unavailable. 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.ModuleHost.LoadModuleControl() --- End of inner exception stack trace ---

When i put breakpoint to each page load , breakpoint only working in first module. Others breakpoint not working, That mean it not invoking page load.

My Install sqlscript i have only one table 

CREATE TABLE {databaseOwner}[{objectQualifier}YourCompany_Charity]
(
[ModuleID] [int] NOT NULL,
[ItemID] [int] NOT NULL IDENTITY(1, 1),
[Content] [ntext] NOT NULL,
[CreatedByUser] [int] NOT NULL,
[CreatedDate] [datetime] NOT NULL
)

Do i want create tables to other my sub modules?

Here is my new .dnn file

<dotnetnuke type="Package" version="5.0">
  <packages><package name="Charity" type="Module" version="1.0.0">
  <friendlyName>Charity</friendlyName>
  <description>Charity </description>
  <iconFile />
  <owner>
    <name>admin</name>
    <organization>ss</organization>
    <url />
    <email />
  </owner>
  <license>The license for this package is not currently included within the installation file, please check with the vendor for full license details.</license>
  <releaseNotes>This package has no Release Notes</releaseNotes>
  <components>
    <component type="Script">
      <scripts>
        <basePath>DesktopModules\Charity</basePath>
        <script type="Install">
          <name>01.00.00.SqlDataProvider</name>
          <version>01.00.00</version>
        </script>
        <script type="UnInstall">
          <name>Uninstall.SqlDataProvider</name>
          <version>1.0.0</version>
        </script>
      </scripts>
    </component>
    <component type="Module">
      <desktopModule>
        <moduleName>Charity</moduleName>
        <foldername>Charity</foldername>
        <businessControllerClass />
        <supportedFeatures />
        <moduleDefinitions>
          <moduleDefinition>
            <friendlyName>Charity</friendlyName>
            <defaultCacheTime>0</defaultCacheTime>
            <moduleControls>
              <moduleControl>
                <controlKey>EditCharity</controlKey>
                <controlSrc>DesktopModules/Charity/EditCharity.ascx</controlSrc>
                <supportsPartialRendering>False</supportsPartialRendering>
                <controlTitle>EditCharity</controlTitle>
                <controlType>Edit</controlType>
                <iconFile />
                <helpUrl />
                <supportsPopUps>False</supportsPopUps>
                <viewOrder>0</viewOrder>
              </moduleControl>
              <moduleControl>
                <controlKey>Settingcharity</controlKey>
                <controlSrc>DesktopModules/Charity/Settings.ascx</controlSrc>
                <supportsPartialRendering>False</supportsPartialRendering>
                <controlTitle>Settingcharity</controlTitle>
                <controlType>Edit</controlType>
                <iconFile />
                <helpUrl />
                <supportsPopUps>False</supportsPopUps>
                <viewOrder>0</viewOrder>
              </moduleControl>
              <moduleControl>
                <controlKey/>
                <controlSrc>DesktopModules/Charity/ViewCharity.ascx</controlSrc>
                <supportsPartialRendering>True</supportsPartialRendering>
                <controlTitle>Viewcharity</controlTitle>
                <controlType>View</controlType>
                <iconFile />
                <helpUrl />
                <supportsPopUps>True</supportsPopUps>
                <viewOrder>0</viewOrder>
              </moduleControl>
            </moduleControls>
          </moduleDefinition>


 <moduleDefinition>
            <friendlyName>AddCharity</friendlyName>
            <defaultCacheTime>0</defaultCacheTime>
            <moduleControls>
              <moduleControl>
                 <controlKey/>
                <controlSrc>DesktopModules/Charity/AddCharity.ascx</controlSrc>
                <supportsPartialRendering>False</supportsPartialRendering>
                 <controlTitle >ViewaddCharity</controlTitle >
                <controlType>View</controlType>
                <iconFile />
                <helpUrl />
                <supportsPopUps>False</supportsPopUps>
                <viewOrder>0</viewOrder>
              </moduleControl>
            </moduleControls>
          </moduleDefinition>
          <moduleDefinition>
            <friendlyName>AddCharityEvent</friendlyName>
            <defaultCacheTime>0</defaultCacheTime>
            <moduleControls>
              <moduleControl>
                 <controlKey/>
                <controlSrc>DesktopModules/Charity/AddCharityEvent.ascx</controlSrc>
                <supportsPartialRendering>False</supportsPartialRendering>
                <controlTitle >addcharityEvent</controlTitle >
                <controlType>View</controlType>
                <iconFile />
                <helpUrl />
                <supportsPopUps>False</supportsPopUps>
                <viewOrder>0</viewOrder>
              </moduleControl>
            </moduleControls>
          </moduleDefinition>
          <moduleDefinition>
            <friendlyName>CreateCharityPage</friendlyName>
            <defaultCacheTime>0</defaultCacheTime>
            <moduleControls>
              <moduleControl>
                <controlKey/>
                <controlSrc>DesktopModules/Charity/CreatePage.ascx</controlSrc>
                <supportsPartialRendering>False</supportsPartialRendering>
                <controlTitle >Createpage</controlTitle >
                <controlType>View</controlType>
                <iconFile />
                <helpUrl />
                <supportsPopUps>False</supportsPopUps>
                <viewOrder>0</viewOrder>
              </moduleControl>
            </moduleControls>
          </moduleDefinition>
          <moduleDefinition>
            <friendlyName>CharityDonation</friendlyName>
            <defaultCacheTime>0</defaultCacheTime>
            <moduleControls>
              <moduleControl>
                <controlKey/>
                <controlSrc>DesktopModules/Charity/Donation.ascx</controlSrc>
                <supportsPartialRendering>False</supportsPartialRendering>
                <controlTitle >Donation</controlTitle >
                <controlType>View</controlType>
                <iconFile />
                <helpUrl />
                <supportsPopUps>False</supportsPopUps>
                <viewOrder>0</viewOrder>
              </moduleControl>
            </moduleControls>
          </moduleDefinition>
          <moduleDefinition>
            <friendlyName>ViewCharityEvent</friendlyName>
            <defaultCacheTime>0</defaultCacheTime>
            <moduleControls>
              <moduleControl>
                <controlKey/>
                <controlSrc>DesktopModules/Charity/ViewEvent.ascx</controlSrc>
                <supportsPartialRendering>False</supportsPartialRendering>
                <controlTitle >ViewEvent</controlTitle >
                <controlType>View</controlType>
                <iconFile />
                <helpUrl />
                <supportsPopUps>False</supportsPopUps>
                <viewOrder>0</viewOrder>
              </moduleControl>
            </moduleControls>
          </moduleDefinition>




        </moduleDefinitions>
      </desktopModule>
    </component>
    <component type="Assembly">
      <assemblies>
        <basePath>bin</basePath>
        <assembly>
          <name>YourCompany.Modules.Charity.dll</name>
        </assembly>
      </assemblies>
    </component>
    <component type="File">
      <files>
        <basePath>DesktopModules\Charity</basePath>
        <file>
          <path>App_LocalResources</path>
          <name>EditCharity.ascx.resx</name>
        </file>
        <file>
          <path>App_LocalResources</path>
          <name>Settings.ascx.resx</name>
        </file>
        <file>
          <path>App_LocalResources</path>
          <name>ViewCharity.ascx.resx</name>
        </file>
       
        <file>
          <name>AddCharity.ascx</name>
        </file>
        <file>
          <name>AddCharityEvent.ascx</name>
        </file>
        <file>
          <name>CreatePage.ascx</name>
        </file>
        <file>
          <name>Donation.ascx</name>
        </file>
        <file>
          <name>ViewEvent.ascx</name>
        </file>
      
        <file>
          <path>Documentation</path>
          <name>Documentation.css</name>
        </file>
        <file>
          <path>Documentation</path>
          <name>Documentation.html</name>
        </file>
        <file>
          <path>Documentation</path>
          <name>logo.gif</name>
        </file>
        <file>
          <name>EditCharity.ascx</name>
        </file>
        <file>
          <name>Settings.ascx</name>
        </file>
        <file>
          <name>ViewCharity.ascx</name>
        </file>
      </files>
    </component>
  </components>
</package></packages>
</dotnetnuke>





 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesAdd module to page raise errorAdd module to page raise error


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