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

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesPortalSettings(portalId) does not contain portalAlias?PortalSettings(portalId) does not contain portalAlias?
Previous
 
Next
New Post
6/24/2013 10:30 AM
 

When I initialise a portalSettings Object in my Web.API module using some portal ID, I get an object with a lot of sane properties, but the PortalAlias property is set to null.

DefaultPortalAlias = "dnndev.me"
PortalAlias = null
PortalAliasMappingMode = CanonicalUrl

This causes problems when the token [Portal:URL] is replaced, as this uses the PortalAlias.HTTPAlias property.
Is this a bug, should it be filled? (I would imagine that in a regular module the PortalAlias will be used to determine what the portalId is, just the other way around compared to a web service) Can I initialise the PortalAlias property with the DefaultPortalAlias property somehow? (or if this not the default alias of the specified portal, but the default for the host?)

 

 
New Post
6/24/2013 2:04 PM
 
portalAliases are stored in a dedicated table, I would expect it using its own object as well.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
6/25/2013 8:42 AM
 
I'm not sure what you're implying.

I've been able to 'fix' it by filling the PortalAliases property with the DefaultPortalAlias.

var portalSettings = new PortalSettings(portalId);
if (portalSettings.PortalAlias == null)
{
portalSettings.PortalAlias = new PortalAliasInfo();
portalSettings.PortalAlias.HTTPAlias = portalSettings.DefaultPortalAlias;
}
DotNetNuke.Services.Mail.Mail.SendMail(user, MessageType.UserRegistrationPublic, portalSettings);

 
New Post
10/15/2013 11:43 AM
 
Unfortunately my fix fails when there is no default alias. When there are multiple aliases, you can select which is the primary, but when there is only one, you can't. Sometimes the only alias is primary, sometimes it isn't.

So I'll have to find a new source for the site url. maybe extract it from portalSettings.ActiveTab.FullUrl or portalSettings.DesktopTabs[0].FullUrl ?
 
New Post
10/15/2013 12:00 PM
 
Or make sure a default alias is selected for the portal. Which you can only set from an other portal (the problem was not that the portal had only one alias, the problem was that it was the current portal)
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesPortalSettings(portalId) does not contain portalAlias?PortalSettings(portalId) does not contain portalAlias?


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