Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-92643

Inconsistent results when rendering different web content localized Friendly URLs and language paths



      • Have an empty site with at least en_US and es_ES locales enabled
      • Create a basic web content
      • Provide "Title" as title and "content" as content in en_US language, ensure friendlyURL is /title
      • Change the language of the web content to es_ES. Provide "Título" as title and "contenido" as content in Spanish, ensure friendlyURL is /título.
      • Publish the web content
      • Create a display page to display "Basic web content". Add a text fragment and map it to the web content "content" field. Mark it as default display page
      • Checkpoint 1: Create a widget page and add an asset publisher app to it. Click on the web content shown so that display page is rendered. Do the same but access the page with the Asset Publisher in Spanish by adding /es to the beginning of the URL path
      • Checkpoint 2: Ensure that canonical URL takes you to the right content localization. http://localhost:8080/-/título and http://localhost:8080/-/title
        • Note: you may get redirections depending on the value of locale.prepend.friendly.url.style property
      • Try the 4 possible crossings between <language in the URL, friendly URL>


       Observed: there are inconsistent results in terms of the chosen language to serve the content and also other elements in the page:

      •  http://localhost:8080/en/-/title serves everything in English (see en-es_and_en-en.png)
      •  http://localhost:8080/en/-/título serves everything in English (see en-es_and_en-en.png)
      •  http://localhost:8080/es/-/title serves the web content in English, but some elements in the page are in Spanish, other in English (see es-en.png)
      •  http://localhost:8080/es/-/título serves everything in Spanish (see es-es.png)

       Expected: there are 2 possible interpretations in presence of language selector in the URL and a localized friendly URL:

      1. Language selector defines the page language, friendlyURL defines the web content language: http://localhost:8080/en/-/título would serve all the page in english but the web content itself in Spanish
      2. Language selector defines the language: http://localhost:8080/en/-/título would serve all the page in english, including the web content

      Currently, notne of the above interpretations is applying.

      Additional note: if user language is set to es_ES from my account settings, and http://localhost:8080/es/-/title is visited, there is a message about changing the page language:

      In that message, if one clicks in "Mostrar la página en español" (Spanish for "Show the page in Spanish"), user is redirected to /es/web/guest/-/title where the message still remains.

      Tested in master at 6d30aff6c2aebac750c630c0675d00eed025ca97


        1. en-es_and_en_en.png
          58 kB
        2. es-en.png
          60 kB
        3. es-es.png
          62 kB
        4. image-2019-03-26-16-00-40-174.png
          13 kB
        5. image-2019-04-05-16-29-13-225.png
          44 kB
        6. image-2019-04-05-16-29-24-745.png
          43 kB

          Issue Links



              • Votes:
                0 Vote for this issue
                0 Start watching this issue


                • Created:
                  Days since last comment:
                  1 year, 19 weeks, 3 days ago


                  Version Package