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

Can't switch language by URL when using custom portal context

    Details

      Description

      1. Set up a custom portal context, e.g. /liferay. For Tomcat this can be done by
      • Renaming <TOMCAT_HOME>/webapps/ROOT to <TOMCAT_HOME>/webapps/liferay
      • Renaming <TOMCAT_HOME>/conf/Catalina/localhost/ROOT.xml to <TOMCAT_HOME>/conf/Catalina/localhost/liferay.xml
      • Editing <TOMCAT_HOME>/conf/Catalina/localhost/liferay.xml and changing <Context crossContext="true" path=""> to <Context crossContext="true" path="/liferay">
      1. Start portal and add a new page e.g. testpage
      2. Manually visit the following URL: http://localhost:8080/liferay/de_DE/web/guest/testpage

      Expected result: testpage opens and language is switched to German
      Actual result: The site's home page opens and the language doesn't change. Following error is shown in the log:

      WARN  [http-bio-8080-exec-9][code_jsp:130] {code="404", msg="/liferay/liferay/de_DE/web/guest/testpage", uri=/liferay/de_DE/web/guest/testpage}
      

      Caused by LPS-68241. It made VirtualHostFilter to always forward the request if a languageId is present in the URL, while previously we only forwarded it if we had to replace the lowercase languageId in it (which makes sense). This results in a duplicate context at the beginning of the URL and a 404.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  2 years, 36 weeks, 6 days ago

                  Packages

                  Version Package
                  6.2.X EE
                  7.0.0 DXP FP13
                  7.0.0 DXP SP3
                  7.0.3 CE GA4
                  7.0.X EE
                  7.1.X
                  Master