DNN Forums

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

Site Create Error - Invalid Settings

 9 Replies
 3 Subscribed to this topic
 31 Subscribed to this forum
Sort:
Author
Messages
Growing Member
Posts: 107
Growing Member

    I am unable to create a new site. dnn complains about element 'settings' has invalid child sitemapcachedays. i can't find it in web.config.

    The element 'settings' has invalid child element 'sitemapcachedays'

    i am using dnn 9.8.1

    How do i correct?

    Veteran Member
    Posts: 1236
    Veteran Member
      Look at Brian Dukes comment on this issue.
      Growing Member
      Posts: 107
      Growing Member

        i searched for all of his comments but did not find anything where he addressed this issue.

        on the other hand, there is this message in the developer tools console:
        Failed to load resource: the server responded with a status of 400 ()
        /API/PersonaBar/Sites/CreatePortal:1 

        i will try another browser

        ps - different browser doesn't help. it looks like some piece of code is missing or security is blocking access. next to remove all content-security-policy

        Growing Member
        Posts: 107
        Growing Member

          clicking the offending url shows this message

          The requested resource does not support http method 'GET'.

          this problem looks like a coding problem where someone didn't annotate the webapi correctly OR incorrect payload going to webapi OR missing data in a configuration setting OR incorrect endpoing called.

          Veteran Member
          Posts: 1236
          Veteran Member
            My apologies. Apparently I didn't include the URL! (Hazard of working late at night ...)

            You want to go here: https://github.com/dnnsof...orm/pull/4415/files.

            What you need to do is go to DesktopModules/Admin/Portals and edit portal.template.xsd adding the five lines highlighted in the linked URL.
            Growing Member
            Posts: 107
            Growing Member
              those additional settings resolved the problem - thank you
              New Around Here
              Posts: 6
              New Around Here

                Good afternoon Joe,

                I would like to know those four lines. The pull is no longer available and I'm curious if my portal.template.xsd is missing those five lines since I also have the same issue with creating a new site. Get a server error:

                jquery.js?cdv=299:2 
                        
                        
                       POST https://www.example.com/A...r/Sites/CreatePortal 500 (Internal Server Error)

                Moderator Note:  I changed the domain name to example.com since this is a universally known test/example URL.  - Will Strohl ;)  

                Veteran Member
                Posts: 342
                Veteran Member
                  Cory, here is a corrected link to reference: https://github.com/dnnsof...form/pull/4415/files

                  David Poindexter


                  Creator:


                  New Around Here
                  Posts: 6
                  New Around Here

                    Well I found the error in the Log4Net logs. Here is the stack trace output:
                    2024-05-23 23:41:26.466+00:00 [EC2AMAZ-48VNO0E][D:4][T:21][ERROR] Dnn.PersonaBar.Sites.Services.SitesController - System.IO.DirectoryNotFoundException: Could not find a part of the path 'D:\gotrwebsite\Portals\_default\'.
                    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
                    at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
                    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
                    at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy)
                    at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
                    at System.Xml.XmlTextReaderImpl.OpenUrlDelegate(Object xmlResolver)
                    at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
                    at System.Threading.CompressedStack.Run(CompressedStack compressedStack, ContextCallback callback, Object state)
                    at System.Xml.XmlTextReaderImpl.OpenUrl()
                    at System.Xml.XmlTextReaderImpl.Read()
                    at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
                    at System.Xml.XmlDocument.Load(XmlReader reader)
                    at System.Xml.XmlDocument.Load(String filename)
                    at DotNetNuke.Entities.Portals.Internal.PortalTemplateIO.GetTemplateLanguages(String templateFilePath)
                    at DotNetNuke.Entities.Portals.Templates.PortalTemplateInfo.InitLocalizationFields(String cultureCode)
                    at DotNetNuke.Entities.Portals.Templates.PortalTemplateController.GetPortalTemplate(String templatePath, String cultureCode)
                    at Dnn.PersonaBar.Sites.Components.SitesController.CreatePortal(List`1 errors, String domainName, String serverPath, String siteTemplate, String siteName, String siteAlias, String siteDescription, String siteKeywords, Boolean isChildSite, String homeDirectory, Int32 siteGroupId, Boolean useCurrent, String firstname, String lastname, String username, String email, String password, String confirm, String question, String answer)
                    at Dnn.PersonaBar.Sites.Services.SitesController.CreatePortal(CreatePortalRequest request)


                    The issue was I didn't have the boilerplate templates (Blank Website.template and Default Website.template).

                    I knew I could figure it out!!!!

                    Veteran Member
                    Posts: 342
                    Veteran Member
                      Posted By Cory Trento on 5/23/2024 6:57 PM

                      Well I found the error in the Log4Net logs. Here is the stack trace output:
                      2024-05-23 23:41:26.466+00:00 [EC2AMAZ-48VNO0E][D:4][T:21][ERROR] Dnn.PersonaBar.Sites.Services.SitesController - System.IO.DirectoryNotFoundException: Could not find a part of the path 'D:\gotrwebsite\Portals\_default\'.
                      at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
                      at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
                      at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
                      at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy)
                      at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
                      at System.Xml.XmlTextReaderImpl.OpenUrlDelegate(Object xmlResolver)
                      at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
                      at System.Threading.CompressedStack.Run(CompressedStack compressedStack, ContextCallback callback, Object state)
                      at System.Xml.XmlTextReaderImpl.OpenUrl()
                      at System.Xml.XmlTextReaderImpl.Read()
                      at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
                      at System.Xml.XmlDocument.Load(XmlReader reader)
                      at System.Xml.XmlDocument.Load(String filename)
                      at DotNetNuke.Entities.Portals.Internal.PortalTemplateIO.GetTemplateLanguages(String templateFilePath)
                      at DotNetNuke.Entities.Portals.Templates.PortalTemplateInfo.InitLocalizationFields(String cultureCode)
                      at DotNetNuke.Entities.Portals.Templates.PortalTemplateController.GetPortalTemplate(String templatePath, String cultureCode)
                      at Dnn.PersonaBar.Sites.Components.SitesController.CreatePortal(List`1 errors, String domainName, String serverPath, String siteTemplate, String siteName, String siteAlias, String siteDescription, String siteKeywords, Boolean isChildSite, String homeDirectory, Int32 siteGroupId, Boolean useCurrent, String firstname, String lastname, String username, String email, String password, String confirm, String question, String answer)
                      at Dnn.PersonaBar.Sites.Services.SitesController.CreatePortal(CreatePortalRequest request)


                      The issue was I didn't have the boilerplate templates (Blank Website.template and Default Website.template).

                      I knew I could figure it out!!!!

                      Congratulations on figuring this out!

                       

                       

                      David Poindexter


                      Creator:


                      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