Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Bug in Child Portal Creation???Bug in Child Portal Creation???
Previous
 
Next
New Post
4/27/2010 6:32 PM
 

Note: This is related to build 5.3.1, not sure about this in other builds

I have been building a site that is to have multiple parent and multiple child portals under each parent that have the following schema:

Parent Portal of:
portal1.dummyportal.com

With child portals like:
portal1.dummyportal.com/spa
portal1.dummyportal.com/golf

When I went to create Portal 2 with a url like portal2.dummyportal.com the Parent created fine but when I went to create the first child portal of: portal2.dummyportal.com/spa I received an error that the child portal already existed (no it didn't) and the portal creation stopped before anything was created.

On examination, of my folders, I found that when the first child portal (portal1.dummyportal.com/spa) was created it created a folder called "spa" in the root of the web. I tried renaming the folder and then tried to create the new child and it worked, so obviously this was the "duplicate" portal. 

In looking at this folder, there is only one file, default.aspx and when I tried to access either child portal, they worked fine, so this one file in the one folder was driving both portals. On examining the code, this file reads the url that comes in and redirects to the correct portal. So why is there a check for this folder it exists and if so throw an error if it does when it will work with the existing file.

So digging further, I looked at the code that creates portals and in file "/DesktopModules/Admin/Portals/Signup.ascx.vb" at around line 243 is a check to see if the folder exists and throw an error if it does. But if you look at the PortalController.vb at around line1266 it does a check to see if the folder exists and creates if it doesn't and then checks for default.aspx existance in the folder and creates if it doesn't and then goes on and creates the portal. 

So in conclusion, if you comment out the check for the existance of the Child Portal in SignUp.ascx.vb to make it read like the following, your code will reuse the child folders created.

 

 'Set Portal Alias for Child Portals
                    If strMessage = "" Then

                        If blnChild Then

                            strChildPath = strServerPath & strPortalAlias

' Removed because this is handled in the PortalController in that it

'If System.IO.Directory.Exists(strChildPath) Then  --- COMMENTED OUT

'strMessage = Localization.GetString("ChildExists", Me.LocalResourceFile)  --- COMMENTED OUT

'Else  --- COMMENTED OUT

If PortalSettings.ActiveTab.ParentId <> PortalSettings.SuperTabId Then

strPortalAlias = GetDomainName(Request) & "/" & strPortalAlias

Else

strPortalAlias = txtPortalName.Text

End If

'End If   --- COMMENTED OUT

End If

End If

 

Is it a bug or not, I don't know, but I have seen lots of problems on the net describing this error message and none that get to the root of the problem, throwing an error on the existence of a folder that doesn't matter if it exists or not.

 


 

 

 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Bug in Child Portal Creation???Bug in Child Portal Creation???


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

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

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. 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.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out