DNN Forums

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

Can't have untranslated module when copied to all pages

You are not authorized to post a reply.

New Around Here

    Hi. I'm having a quite usual case on one of my customer web site and can't find a way to make it work. I need a module that is displayed on all pages in all languages, but not translated (blue link icon unchecked).

    So I created a module on home in main language and enabled the option to display it on all pages. Works fine. Then I've added all non localized pages. Pages are created successfully and the module is copied to all pages in all languages. BUT, it can't be untranslated. The blue link icon is disabled.

    So I tried to do it the other way. I created the module on home, but without enabling the option to show it on all pages. I then added all non localized pages. The module is created properly on home and can be chained (blue link icon can be clicked). That's fine. BUT If I enable the option to show on all pages, it only works in main language. In other languages, the module is not copied to all pages.

    Isn't it possible to have a not translated module copied to all pages of all languages?

    New Around Here

      I've made some tests and checked what happens in the database. So I've added a module on home page in default language. This create an entry in Modules table, for the example, let's suppose ModuleID = 100. An entry is also created in TabModules table with ModuleID column = 100 (logical).

      I then went to Localization settings of the page and copied the module to other languages (FR and DE). DNN creates an entry in Modules table for each language. Let's say French gets ModuleID = 101 and German gets ModuleID = 102. It also create 2 entries in TabModules table, with ModuleID column pointing to each corresponding entries in Modules. So we now have 3 entries in TabModules having ModuleID = 100, 101 and 102.

      I have then modified the configuration and set the module as not translated (clicked the blue link in Localization settings of the page). When done, the entries in Modules table are removed, except the one for the default language. So in Modules table, only default language remains. That's the row with ModuleID = 100. In TabModules, the entries are still there. But all now points to ModuleID = 100.

      Finally, if I now check the option to show module on all pages, table Modules remains unchanged. Only ModuleID = 100 exists. In table TabModules, an entry is created for each page of the site for the default language. New entries points as expected to ModuleID = 100. But no entry is created for other languages. In resume, in TabModules table, we still have the 3 first entries for the home page in all languages, then an entry for each other page in default language, but nothing for other languages. That explain why the module doesn't appear on other pages when not in default language. I have the feeling that it's a bug or am I missing something?

      New Around Here

        It seems I'm the only one using untranslated module on several pages :-(

        To add some information, I tried to link a module on two page manually. In short, I've added a module on a page. Then, I copied the module to other languages and clicked the blue link icon to make it untranslated. Then, I've created a new page and used the function to add an existing module with copy option unchecked (to link the module, not copy it). On other languages of the page, the module can be copied in localization tab, but it can't be untranslated. The blue link icon is disabled. As it's the same process in the background, it's logical. But wanted to add that information.

        Unfortunately, I have several web sites that needs to go only within a few days. They are all affected by that bug. The only solution I see in short term is to add manually missing entries in TabModules table. If someone has a better idea, he's welcome.

        Veteran Member

          this sounds like a bug, please log at https://github.com/dnnsof...Dnn.Platform/issues.

          For the moment, I suggest using translated modules to be displayed on all pages - you need to update the content once per language, but it should be referenced on all other pages.

          New Around Here

            Hi Sebastian. Thanks for the reply. I've logged the bug some minutes ago here : https://github.com/dnnsof...latform/issues/3459. Unfortunately, we're using custom modules that are loading the content for all languages automatically based on moduleid. Using translated module is then not ideal as content will be linked to wrong moduleid and could cause troubles when the bug is fixed. I'll check if I can maybe in the meantime fix things manually in TabModules table.

            Veteran Member

              thank you for logging the issue.
              Be aware that besides the tabmodules table you might also need entries in tabmodulesettings table (depending on your module and page specific module settings). Good luck.

              New Around Here

                As my customers are using custom modules we wrote for them, I found a better way. I just check if module is localized and not in default language when their view method is called. If that's the true, I'm calling ModuleController DeLocalizeModule function. It works almost fine. As expected, this function deletes the localized module when done, which then deletes the content item. Unfortunately, function DeleteContentItem tries to delete content item without checking if it's in use by another module. This causes an exception in some cases that needs to be caught. So I'm not sure, in that case, if function is successful. I just suppose it is and continue. Maybe I should rewrite DeLocalizeModule to delete module manually and avoid calling DeleteContentItem if it's not fine. But I'm surprised that this exception does not causes troubles in other situations.
                You are not authorized to post a reply.

                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