DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

Two modules added

 6 Replies
 2 Subscribed to this topic
 15 Subscribed to this forum
Sort:
Author
Messages
Veteran Member
Posts: 1158
Veteran Member

    No idea why - I wrote a custom module. It compiles without errors, it does not show any error or warning in the EVS, it installs without any error. But everytime I try to add it on a page, there are two instances of the module (different IDs!) added to the page. I can't find the reason.

    Any ideas?

    Happy DNNing!
    Michael

     

    Michael Tobisch
    DNN★MVP

    dnnWerk Austria
    DNN Connect
    Growing Member
    Posts: 86
    Growing Member
      Check the manifest and module definition table. We had same problem with forums module where we had a two module definitions records for same module definition but with different name. Perhaps you copied your module and manifest from an existing custom module but didn’t change everything in the manifest?
      Senior Member
      Posts: 1357
      Senior Member
        John's suggestion is a great one. I've also seen this happen in the past with a module that has a JS that caused the JS to run more than once. It was a PITA to track down, too!
        Veteran Member
        Posts: 1158
        Veteran Member

          Thanks, John, that seems to be the reason. I have 2 entries in the ModuleDefinitions table with the same DesktopModuleID.

          This seems to be the result of changing the FriendyName from "My_Custom_Module" to "My Custom Module" somewhen.

          Is it enough to delete the older record, or is there anything else to keep an eye on (there are dependent records in the ModuleControls table for example)?

          Happy DNNing!
          Michael

           

           

          Michael Tobisch
          DNN★MVP

          dnnWerk Austria
          DNN Connect
          Growing Member
          Posts: 86
          Growing Member
            Uninstall the module, then look for and delete any orphan records in moduledefinitions and modulecontrols, then reinstall?
            Growing Member
            Posts: 86
            Growing Member
              Here’s what we did for the forums module
              https://github.com/DNNCom...unityForums/pull/731

              You should be able to do this for the module name you don’t want to keep.
              Veteran Member
              Posts: 1158
              Veteran Member
                Posted By johnhenley on 8/21/2024 2:08 PM
                Uninstall the module, then look for and delete any orphan records in moduledefinitions and modulecontrols, then reinstall?

                And loose all content of a module that was used about 150 times on the site? ;-)

                Thanks to a testing environment, I could do it. I had two records in the ModuleDefinitions table with the same DesktopModuleID. Using the ModuleControls table I found out which one to keep and which one to throw - the "older" version had a control that was thrown (or the functionality was merged with another control).

                Then I changed the ModuleDefID in the Modules table from the "old" value to the new one (I forgot to do that in the first case, so I lost all the modules with the old value after deleting the record from the ModuleDefinitions table - it is a good idea to have everything in a testing environment :-)). Finally I deleted the record in the ModuleDefinitions table, and - hooray! - the depending records in the ModuleControls were gone as well. There were no depending records in the Permission and ProfilePropertyDefinition tables.

                After restarting the app pool everything was fine...

                Happy DNNIng!
                Michael

                 

                 

                Michael Tobisch
                DNN★MVP

                dnnWerk Austria
                DNN Connect

                These Forums are dedicated to the discussion of DNN Platform.

                For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

                1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
                2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
                3. 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.
                4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
                5. No Flaming or Trolling.
                6. No Profanity, Racism, or Prejudice.
                7. Site Moderators have the final word on approving / removing a thread or post or comment.
                8. English language posting only, please.

                Would you like to help us?

                Awesome! Simply post in the forums using the link below and we'll get you started.

                Get Involved