1
votes

Having trouble creating a manifest for a couple of modules. The module controls live in:

DesktopModules/Org/ItemManagement

Each module does related but different things, and so should be draggable onto a page as a standalone module.

After looking around, I think I need to create multiple package definitions in the manifest, so I have done that. I have then uploaded the controls and the manifest to the above folder, and installed using Host->Extensions->Create New Module->From Manifest

It seemed to installed okay, appears in the extension list, and appears in the module bar to add to a page; however, when I drag to a location on the page, the page errors on the call to /DesktopModules/internalservices/API/controlbar/AddModule with "The requested resource does not support http method 'GET'.".

If I put each control in a separate folder and install using Host->Extensions->Create New Module->From Control everything works fine, however this is not ideal as all controls will eventually share resources liek CSS, scripts etc., and ideally I want them to just get them from the ModulePath, just so everything is in one place.

Is there anything obviously wrong in my manifest?

    <?xml version="1.0" encoding="UTF-8"?>
    <dotnetnuke type="Package" version="5.0">
        <packages>
            <package name="Org_My_Items" type="Module" version="01.00.00">
                <friendlyName>My Items</friendlyName>
                <description>
                    My Items grid
                </description>
                <owner>
                    <name>Org</name>
                    <organization>Org</organization>
                    <email>[email protected]</email>
                </owner>
                <components>
                    <component type="Module" version="01.00.00">
                        <desktopModule>
                            <moduleName>My Items</moduleName>
                            <foldername>Org</foldername>
                            <moduleDefinitions>
                                <moduleDefinition>
                                    <friendlyName>My Items</friendlyName>
                                    <moduleControls>
                                        <moduleControl>
                                            <controlSrc>DesktopModules/Org/ItemManagement/MyItems.ascx</controlSrc>
                                            <controlTitle>My Items</controlTitle>
                                            <controlKey>MyItems</controlKey>
                                            <controlType>View</controlType>
                                        </moduleControl>
                                    </moduleControls>
                                </moduleDefinition>
                            </moduleDefinitions>
                        </desktopModule>
                    </component>        
                </components>
            </package>
            <package name="Org_My_Details" type="Module" version="01.00.00">
                <friendlyName>My Details</friendlyName>
                <description>
                    My Details summary display
                </description>
                <owner>
                    <name>Org</name>
                    <organization>Org</organization>
                    <email>[email protected]</email>
                </owner>
                <components>
                    <component type="Module" version="01.00.00">
                        <desktopModule>
                            <moduleName>My Details</moduleName>
                            <foldername>Org</foldername>
                            <moduleDefinitions>
                                <moduleDefinition>
                                    <friendlyName>My Details</friendlyName>
                                    <moduleControls>
                                        <moduleControl>
                                            <controlSrc>DesktopModules/Org/ItemManagement/MyDetails.ascx</controlSrc>                                       
                                            <controlTitle>My Details</controlTitle>
                                            <controlKey>MyDetails</controlKey>
                                            <controlType>View</controlType>
                                        </moduleControl>
                                    </moduleControls>
                                </moduleDefinition>
                            </moduleDefinitions>
                        </desktopModule>
                    </component>        
                </components>
            </package>
        </packages>
    </dotnetnuke>
1

1 Answers

2
votes

I have a similar package setup with my open-source DNN Social module. Compare what I have as it is working to install two desktop modules, each with their own module definition, and living in the same folder.

One thing I noticed is that you have specified a controlkey for your module controls. It is my understanding that DNN looks for one control within each moduledefinition with an empty control key <controlKey /> which denotes the default view of the module. Maybe that is an issue?