2

We have problems setting the second Publication. We used to configure the cd_dynamic_conf.xml, but now it doesn't exist in the project. However, it seems that the documentation is not updated. When we create the new Publication, the Page is not found (404 error). We have followed steps 1, 2, 3 & 4.

Any suggestions?

We published the publish settings page. Are we missing anything more?

LOG

ERROR c.s.w.c.controller.PageController - Failed to retrieve localization for request url = http://localhost:8080/webextras/es/test/index.html, uri = /webextras/es/test/index.html com.sdl.webapp.common.api.localization.LocalizationNotFoundException: Localization not found at com.sdl.webapp.common.impl.WebRequestContextImpl.localization(WebRequestContextImpl.java:220) at com.sdl.webapp.common.impl.WebRequestContextImpl.getLocalization(WebRequestContextImpl.java:82) at com.sdl.webapp.common.impl.WebRequestContextImpl.isPreview(WebRequestContextImpl.java:105)

We call to the service and we checked that the publication exists.

TtmWebsite enter image description here

Still when accessing:

http://localhost:8080/webextras/es/test/index.html

We get a 404 error. The page is published & the publish_settings as well.

http://cdservice.com:8182/discovery.svc/PublicationMappings('45')

SOLUTION When deleting the contextUrl, and let it as root, it works. Does it mean that there's a bug in the product related with contextUrl different to root?

  • Please provide the log – Sayantan Basu May 24 '18 at 8:56
  • Please provide the output of Get-TtmWebsite, Get-TtmWebApplication and Get-TtmMapping (Topology Manager PowerShell cmdlets) – Rick Pannekoek May 24 '18 at 16:45
  • Do you still get the LocalizationNotFound exception, or is it a PageNotFoundException now? – Rick Pannekoek May 30 '18 at 20:07
  • Did you really deploy your DXA web app with Context URL /webextras? If so, does it work properly if you deploy it as ROOT (and update Topology Manager accordingly)? – Rick Pannekoek May 30 '18 at 20:09
  • Please share your _all.json (see Velmurugan’s Answer below) – Rick Pannekoek May 30 '18 at 20:12
2

I suspect your web app URL http://localhost:8080 not added to your Topology manager website base URL.

If you run Get-TtmWebsite and look at the BaseUrls of your website, I would expect that you will not see an entry for http://localhost:8080

To update the BaseUrls, to add http://localhost:8080 you can run

Set-TtmWebsite -Id WebsiteId1 -BaseUrls @("http://dev.local","http://localhost:8080")

Regarding, Multi-language - Language selector documentation indeed explained correctly.

Try to validate the following steps are correctly setup for the Multi-language language selector.

  1. Parent Language publication, double check the highlighted image values are correctly setup as expected.enter image description here

  2. Child language publication, double check the highlighted image values exist or not. enter image description here

Note: Important to note Site Identifier - used to group publications together to define a single website - should have the same value.

  1. Ensure you have set up the publishing business process type in child publication too and then it's configured website publication mapping relative URL in Topology Manager.

    PS C:\Windows\system32> Get-TtmMapping
    
    CmEnvironmentId     : TridionCM_localhost 
    PublicationId       : tcm:0-8-1 
    EnvironmentPurpose  : Staging 
    WebApplicationId    : Website1_RootWebApp 
    RelativeUrl         : / 
    PrimaryMappedUrl    : http://localhost:8080/ 
    IsOffline           : False 
    CdEnvironment       :  
    Id                  : Mapping1 
    ExtensionProperties : {}
    
    PS C:\Windows\system32> Add-TtmMapping -RelativeUrl nl -PublicationId tcm:0-10-1 -WebApplicationId Website1_RootWebApp
    
  2. Localize to update the Localization Configuration component on child publication content level, to change the culture and language values

  3. Publish both parent and child publication Publish Settings page.

  4. Refresh the cache and reload the settings in the Web app by In IIS, recycle your website Application Pool or by accessing http://localhost:8080/admin/refresh?allSiteLocalizations=true

  5. Access your website to check the language selector displays or not.

  6. You can also double check [DXA-Webapp-Install]\BinaryData\8\system\config_all.json, siteLocalizations has both publication language details. enter image description here

Update:

Discovery Service out-of-sync with Topology Manager then you can force sync the Discovery Service using the Sync-TtmCdEnvironment cmdlet

I hope it helps.

  • Thank you! I still have a doubt, what happens here with the context of the application. I have one publication with two contexts, do I need to create different baseUrls? E.g. localhost:8080/app1/es/home/index.html and localhost:8080/app2/es/faq/index.html – tfinez May 28 '18 at 16:29
  • No, these are not different Base URLs. See tridion.stackexchange.com/questions/14247/… – Rick Pannekoek May 29 '18 at 6:23
  • I still got the 404 error, I updated the question with the results of the topology manager – tfinez May 29 '18 at 12:58
  • double check your broker DB, In the page table URL field has all the pages published with your context-URL start with /webextras/? – Velmurugan May 30 '18 at 10:17
  • We had to restart the CD microservice to get the new conf from the Topology Manager. Is this a bug of SDL Web? – tfinez May 30 '18 at 15:21
0

There were Known Issues with running DXA as a non-root Web Application in the past. See also: PublicationMapping Error occurs on DXA 1.4 Java version, SDL Web 8

Full support (and testing) for running DXA as a non-root Web App was an item on the (internal) backlog. IIRC, DXA.NET 1.6+ seemed to work properly as non-root Web App, but we didn’t fully test it.

I’m not sure what the current status is, but if you're having issues getting it to work and you really want to use a non-root Web App, please report an issue on GitHub. That will put it back on the radar.

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.