DNN Forums

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

Help with Theme/ default container

You are not authorized to post a reply.

Advanced Member

    Can someone help me figure this out? I had an admin user accidentally hit the "Restore Default theme" link, and now, I don't see the same list of containers under the Theme, when I go to Themes. It has broken abunch of modules that were det to default container. I can fix them page by page, but I'm not sure how to get the Containers back to be assigned to the Theme

    Senior Member

      Hello Tom: 

      Are you using one of those themes that have built-in theme management features?  For example, when you're logged in, can you change various visual attributes of the theme without writing code?  If yes, you may need to consult with the vendor's support and/or documentation.  

      If not, then you'll need to set things up again on the website.  (Also, you should demote all user accounts that don't need administrator access.  Otherwise, this will just happen again - or something even worse.)  ☹️ 

      It won't be easy for any of us to tell you how to fix this.  Every site has a different theme and implementation of that theme - even if they're using the same one from the DNN Store.  

      One way to do this is to restore or look at a Development/Staging copy of the site.  Then, update the Theme settings to match, then go page by page, and module by module to view and duplicate the theme settings.  This will be tedious and time-consuming, but it's easy enough to do on sites of any size.  

      Another way to do this is to restore a backup of the website database, then use SQL and/or a SQL tool to compare the database tables to generate an update script to restore all of the theme and container settings in the database.  

      Senior Member

        Oh, and if you have Upendo Prompt installed, this command could help you on smaller website instances.  


        Advanced Member

          Thanks Will, Fortunately I do have a very recent backup of the website running on the test server.
          So I'm looking at Manage >> Themes on both sites to compare.
          For the (broken) production site, I'm seeing just a few items under Containers., for the (working) test site, I'm seeing the full list. So I'm wondering how to restore the Containers on the production site to be the same as the test site.

          Advanced Member

            I think I was able to fix the issue with an update to the Portal Settings table - DefaultAdminContainer and DefaultPortalContainer - it seemed like it was thse defaults that changed and were causing the issue. Fingers crossed.

            Senior Member

              I had a few minutes to dig into the source code.  As long as you used the built-in "Restore Default Theme" link in the persona bar (Themes view), you should be fine having restored the Edit and View theme default settings at the site level.  The screenshot of the code should confirm that for you and give you some peace of mind.  💪🏽 

              Advanced Member

                Thanks! Yes it seems to be working. I was able to look at the (very recently restored) test version of the site and compare. I found in PortalSettings the place where I could restore the default skins and containers for that theme.
                Thanks again
                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