1

In my scenario, I have two brand sites with different locales.

e.g

www.brandsite1.com/en/pl
www.brandsite2.com/en/us

When a user looking for www.brandsite2.com/en/pl the DXA Framework shows error page with the brandsite1 layout and theming. Since the relative URL Pl present in brandsite1.

Can someone help me to resolve the issue?

Trdion DXA Version: 2.0 .Net Framework.

Topology Manager:

BaseUrls             : {http://staging.brandsite1.com, http://localhost:50534}
CdEnvironmentId      : CdEnvironment1
EnvironmentPurpose   : Staging
CdEnvironment        :
ScopedRepositoryKeys : {}
Id                   : brandsite1Website
ExtensionProperties  : {}

BaseUrls             : {http://staging.brandsite2.com, http://localhost:50543}
CdEnvironmentId      : CdEnvironment1
EnvironmentPurpose   : Staging
CdEnvironment        :
ScopedRepositoryKeys : {}
Id                   : CarrierWebsite
ExtensionProperties  : {}



ContextUrl           : /
WebsiteId            : brandsite1Website
EnvironmentPurpose   : Staging
CdEnvironment        :
ScopedRepositoryKeys : {}
Id                   : brandsite1Website_RootWebApp
ExtensionProperties  : {}

ContextUrl           : /
WebsiteId            : brandsite2Website  
EnvironmentPurpose   : Staging
CdEnvironment        :
ScopedRepositoryKeys : {}
Id                   : brandsite2Website_RootWebApp
ExtensionProperties  : {}


CmEnvironmentId     : Tridion_cm_user
PublicationId       : tcm:0-50-1 
EnvironmentPurpose  : Staging 
WebApplicationId    : brandsite1Website_RootWebApp 
RelativeUrl         : /pl 
PrimaryMappedUrl    : http://staging.brandsite1.com/pl 
IsOffline           : False 
CdEnvironment       : 
Id                  : brandsite1WebsiteMappingPL 
ExtensionProperties : {}  

CmEnvironmentId     : Tridion_cm_user 
PublicationId       : tcm:0-60-1 
EnvironmentPurpose  : Staging 
WebApplicationId    : brandsite2Website_RootWebApp 
RelativeUrl         : /en 
PrimaryMappedUrl    : http://staging.brandsite2.com/en 
IsOffline           : False 
CdEnvironment       : 
Id                  : brandsite2WebsiteMappingEN 
ExtensionProperties : {}  
5
  • Which version of DXA are you using? And is it .NET or Java? Commented May 28, 2019 at 6:14
  • Could you also please update the Topology manager configuration of your website and mapping details?
    – Velmurugan
    Commented May 28, 2019 at 10:02
  • Updated my question
    – Arulmozhi
    Commented May 28, 2019 at 12:05
  • Which “error page” are you referring to? For a Page Not Found, for example? Commented May 28, 2019 at 15:52
  • @RickPannekoek - Page Not Found Error.
    – Arulmozhi
    Commented May 29, 2019 at 13:35

1 Answer 1

2

Localization resolving has been moved to Tridion CIL. Can you test http://localhost:50534 and http://localhost:50543 and ensure everything is fine?

If the above comes up fine, I suspect the issue with your TopMan scripts. It is important that TopMan does have all of the combinations, with relevant ports, added to your topman configurations. Adding just the domains does not do the trick for child websites, when you are using relative or context paths. Based on the protocol (HTTP or HTTPS), port 80 or 443 is considered to be incoming port and hence the localization will be resolved incorrectly. DXA inturn will just throw an error page.

For example, I would need to also add {http://staging.brandsite2.com, http://staging.brandsite2.com:50543, http://localhost:50543} and {http://staging.brandsite1.com, http://staging.brandsite1.com:50534, http://localhost:50534}; based on however your web application is setup in IIS or your load balancer.

Update:

Good to know it works well with the other ports. Can you update your TopMan to use port 80 explicitly? Something like {http://staging.brandsite2.com, http://staging.brandsite2.com:80, http://localhost:50543}

As an investigation, you can update your DXA CD code to highlight the DXA domain, port, path and publication ID from the mapping. If the publication ID and path does not correspond to your child publication, your DXA application will throw an error. Source code CdApiLocalizationResolver is HERE.

Update 2

It did some digging and can confirm that SDL has also provided a hotfix for this. You can try applying the hotfix with your old TopMan configs to also resolve the issue.

CD_8.5.0.12584

2
  • Both localhost Urls are working properly with 50534 and 50543 ports. For staging sites, there are no different ports. Used the default port 80 in IIS for both brand sites.
    – Arulmozhi
    Commented May 29, 2019 at 13:39
  • I have updated my answer based on your response. The solution is not with DXA but with your top man resolution for child websites. There is something quirky in SDL default mapping resolution for child websites when port is not specified in the top man configurations. For some reason, it ignores the path when the port is not explicitly mentioned. I remember asking SDL support to come up with a knowledge base article but not sure if we have one yet. I will search for it. Hope it helps!
    – Shiva
    Commented May 29, 2019 at 15:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.