2

UPDATE: Topology Mappings screen grab (host name obscured)

Topology Mappings


We have setup a new instance of SDL Web 8.5 with DXA v2.0 and the Model Service using the R2 data model.

Working Example (not accessible publicly) GET http://cis.building-blocks.com:8998/PageModel/tcm/5/index

When requesting a page model from the model service for our '400 Example Site' (tcm:0-5-1) we get the expected 200 response with JSON body.

Failing Example(s) (not accessible publicly) GET http://cis.building-blocks.com:8998/PageModel/tcm/6/index GET http://cis.building-blocks.com:8998/PageModel/tcm/7/index

However, after creating child website publications that inherit '400 Example Site' and publishing out the pages etc I get the following 404 Not Found response:

Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.

Wed Jul 11 14:27:26 UTC 2018
There was an unexpected error (type=Not Found, status=404).
Page not found

This applies to two test publications:

'500 Example Site (/en/us)' (tcm:0-6-1) '500 Example Site (/fr/ca)' (tcm:0-7-1)

Topology mappings have been registered in the normal way with a root web application of dxa.building-blocks.com and multiple child websites for /en/us and /fr/ca.

There are no errors being reported in the logs and we have confirmed that the pages are published in the broker and work for the DXA presentation application. Just seemingly not when interacting directly with the model service.

Any suggestions?

  • Please edit your question and update to share the topology manager settings results of Publication mapping and Ttmwebsite settings of your DXA setup? – Velmurugan Jul 11 '18 at 15:20
  • 3
    I think model service URL should be this, If you have created PublicationURL that child websites as /en/us and /fr/ca. cis.building-blocks.com:8998/PageModel/tcm/6//en/us/index and cis.building-blocks.com:8998/PageModel/tcm/7//fr/ca/index – Velmurugan Jul 11 '18 at 15:34
  • Hi @Velmurugan, That modified path for the CIS works but I am confused as to why the path prefix is necessary when the publication id is already present and I would have expected the path to be relative to the resolved website, not have to duplicate the path prefix for the page path. – John Askew Jul 11 '18 at 15:45
  • @Velmurugan, You should re-submit your comment(s) as an answer for me to accept. When including the path prefix for a mapped website in my request to the CIS and Model Service I get the JSON response expected. – John Askew Jul 11 '18 at 15:57
2

I agree with @Rick answer DXA Model Service is not a public API.

Since you have created one parent publication with 2 child publication multilingual websites and also you have configured the same domain with different relative URL of the multilingual website.

Actually, you have tried to access direct Model service URL did not pass correct full URL of the page.

To fix this issue on your DXA web application you have to Configuring the web application for multilingual websites (Language selector), then it will resolve the correct full URL of the page, you can able to check the model service URL request parameters using fiddler if you want to debug to understand.

Refer to this question answer for more information.

2

Please note that the DXA Model Service is not a public API, so I presume this Question is just out of curiosity.

As @Velmurugan mentioned, the Model Service URL contains both the Publication ID and the full URL path of the Page.

Indeed, this may seem redundant, but it is not in all situations. DXA supports mapping different domains to different Publications. In that case, the URL paths may not be distinct, but because the Publication ID (which was resolved earlier from the full URL) is included, there is sufficient information to disambiguate.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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