we are configuring TRI and we are mapping the application for multilingual Websites.
But It's not working. only it's detecting the first publication/language set on the cd_dynamic_conf.xml
Debugging the code we see:
webRequestContext.setBaseUrl(getBaseUrl(request));
webRequestContext.setContextPath(urlPathHelper.getOriginatingContextPath(request));
webRequestContext.setRequestPath(urlPathHelper.getOriginatingRequestUri(request));
webRequestContext.getFullUrl()
The url that we are requesting is: http://localhost:8080/tms4web/en/index.html
The result of execution is:
The base url for our app is: http://localhost:8080
The context path is: /tms4web
The request url is: /tms4web/en/index.html
The full url is: http://localhost:8080/tms4web/tms4web/en/index.html
We are seeing that is concatenating two times /tms4web and we suspect that, when is trying to find the publication in the cd_dynamic_conf.xml, it's not able to find it.
Also, we see that is only parsing the settings.json for the first publication in the cd_dynamic_conf.xml. We think that is treating like the default publication when don't find the path.
Our cd_dynamic_conf.xml is:
<?xml version="1.0" encoding="UTF-8"?>
<Configuration Version="7.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="schemas/cd_dynamic_conf.xsd">
<URLMappings>
<StaticMappings>
<Publications>
<Publication Id="23">
<Host Protocol="http" Domain="localhost" Port="8080" Path="/tms4web/es"/>
</Publication>
<Publication Id="22">
<Host Protocol="http" Domain="localhost" Port="8080" Path="/tms4web/en"/>
</Publication>
</Publications>
</StaticMappings>
<StorageMapping IdentifyPublicationByProperty="publicationUrl"/>
</URLMappings>
<TCDLEngine>
<Properties>
</Properties>
</TCDLEngine>
</Configuration>
Our cd_link_conf.xml is:
<?xml version="1.0" encoding="UTF-8"?>
<Configuration Version="7.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="schemas/cd_link_conf.xsd">
<Publications>
<Publication Id="23">
<Host Protocol="http" Domain="localhost" Port="8080" Path="" />
</Publication>
<Publication Id="22">
<Host Protocol="http" Domain="localhost" Port="8080" Path="" />
</Publication>
</Publications>
</Configuration>
In tridion, we localized the "Localization Configuration" component and we published the setting page in both languages (pub 22 and pub 23). In the publication path we set: /tms4web/en for pub 22 and /tms4web/es for pub 23.
What are we doing wrong?
Thank you.