1

We have 2 websites (brands) with different domains.

In Topology, the 2 websites are configured with base urls as : http://domain1 and http://domain2 And mapping for UK publication exists only in domain1

PublicationId       : tcm:0-307-1
EnvironmentPurpose  : Purpose-Live
WebApplicationId    : DOMAIN1_LIVE_WEBSITE_RootWebApp
RelativeUrl         : /uk
PrimaryMappedUrl    : http://domain1/uk
IsOffline           : False
CdEnvironment       :
Id                  : Live_Mapping_307

But when I try to get Publication for domain2 in Content service using GetPublicationMappingsFunctionImport (via Postman) - It gets resolved to 307. This should not return any mapping.

http://localhost:8481/client/v4/content.svc/GetPublicationMappingsFunctionImport(Url='http://domain2/uk')

Is there any way to configure Content service (or Discovery) to do an exact match of Website + WebApplication + Mapping to resolve PublicationMapping ?

Get-TtmWebsite cmdlet output:

BaseUrls             : {http://domain1}
CdEnvironmentId      : Live
EnvironmentPurpose   : Purpose-Live
CdEnvironment        :
ScopedRepositoryKeys : {}
Id                   : DOMAIN1_LIVE_WEBSITE
ExtensionProperties  : {}


BaseUrls             : {http://domain2}
CdEnvironmentId      : Live
EnvironmentPurpose   : Purpose-Live
CdEnvironment        :
ScopedRepositoryKeys : {}
Id                   : DOMAIN2_LIVE_WEBSITE
ExtensionProperties  : {}

Get-TtmMapping output:

CmEnvironmentId     : CME
PublicationId       : tcm:0-307-1
EnvironmentPurpose  : Purpose-Live
WebApplicationId    : DOMAIN1_LIVE_WEBSITE_RootWebApp
RelativeUrl         : /uk
PrimaryMappedUrl    : http://domain1/uk
IsOffline           : False
CdEnvironment       :
Id                  : Live_Mapping_307


CmEnvironmentId     : CME
PublicationId       : tcm:0-349-1
EnvironmentPurpose  : Purpose-Live
WebApplicationId    : DOMAIN2_LIVE_WEBSITE_RootWebApp
RelativeUrl         : /us
PrimaryMappedUrl    : http://domain2/us
IsOffline           : False
CdEnvironment       :
Id                  : Domain2_Live_Mapping_307
ExtensionProperties : {}

We also have similar mappings for both domain1 and domain2 (like /uk in domain1 and /uk/en in domain2), but there are few which are specific to domain1 only (for example: /global, or /worldwide) which do not exist for domain2.

But when requesting for PublicationMapping, like this http://localhost:8481/client/v4/content.svc/GetPublicationMappingsFunctionImport(Url='http://domain2/global') - we get response of mapping that exist for domain1.

Tridion- 8.5
DXA - 2.0 Java

7
  • Can you share your output of Get-TtmWebsite cmdlets?
    – Velmurugan
    Commented Jun 20, 2020 at 14:16
  • Hi @Velmurugan, I have updated the question with Get-TtmWebsite cmdlet output. Commented Jun 20, 2020 at 15:25
  • Also Get-TtmMapping output?
    – Velmurugan
    Commented Jun 20, 2020 at 15:42
  • regarding "/uk in domain1 and /uk/en in domain2" domain2 only has mapping /us right? where is the mapping /uk/en? can you also share the Get-TtmWebApplication cmdlet to see the contextual
    – Velmurugan
    Commented Jun 21, 2020 at 8:49
  • 1
    Your TTM configuration looks fine and the resolving behavior you report sounds like a defect in Content Delivery. I recommend to contact SDL Customer Support for this Commented Jun 22, 2020 at 16:27

2 Answers 2

1

This issue has been fixed by SDL in following Hotfix: CD_8.5.0.21995

CRQ-21932 - DXA - Resolving Publication mapping incorrectly when having multiple websites

1

Have you tried to use context URLs instead on relative URLs when you setup topology?

I have faced a similar issue with 8.5 since one of the content delivery jars sorts the first hit from the mappings based on the pattern search. I used context URLs to resolve the issue. SDL may have a hotfix now.

1
  • What's a "context URL"?
    – Neil
    Commented Apr 9, 2021 at 10:52

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.