Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions DNN Platform/Library/Entities/Portals/PortalController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2637,13 +2637,23 @@ private void CreatePortalInternal(int portalId, string portalName, UserInfo admi
IPortalInfo portal = obsoletePortal;
portal.Description = description;
portal.KeyWords = keyWords;
portal.UserTabId = TabController.GetTabByTabPath(portal.PortalId, "//UserProfile", portal.CultureCode);

// The template sets these from its usertab/searchtab markers; tab paths are only a fallback,
// since they are built from tab names and do not match localized templates.
if (portal.UserTabId == -1)
{
portal.UserTabId = TabController.GetTabByTabPath(portal.PortalId, "//ActivityFeed", portal.CultureCode);
portal.UserTabId = TabController.GetTabByTabPath(portal.PortalId, "//UserProfile", portal.CultureCode);
if (portal.UserTabId == -1)
{
portal.UserTabId = TabController.GetTabByTabPath(portal.PortalId, "//ActivityFeed", portal.CultureCode);
}
}

if (portal.SearchTabId == -1)
{
portal.SearchTabId = TabController.GetTabByTabPath(portal.PortalId, "//SearchResults", portal.CultureCode);
}

portal.SearchTabId = TabController.GetTabByTabPath(portal.PortalId, "//SearchResults", portal.CultureCode);
this.UpdatePortalInfo(obsoletePortal);

adminUser.Profile.PreferredLocale = portal.DefaultLanguage;
Expand Down
Loading