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

Can't change language when viewing an article in context, using virtual host and custom context path



      1. Set up a custom context path for your portal. In Tomcat you can do this with the following steps:
        • Add the following 2 lines to portal-ext.properties file:
          • portal.ctx=/cms
          • portlet.virtual.path=/cms
        • Rename the /ROOT folder to /cms in TOMCAT_HOME/webapps
        • Rename "TOMCAT_HOME/conf/Catalina/localhost/ROOT.xml" to "TOMCAT_HOME/conf/Catalina/localhost/cms.xml"
        • Edit "TOMCAT_HOME/conf/Catalina/localhost/cms.xml" change <Context path="" crossContext="true"> to <Context path="/cms" crossContext="true">
        • Delete the content of the folders /temp and /work in TOMCAT_HOME (delete the tomcat cache)
      2. Set a custom hostname in your computer's hosts file, e.g. mydomain.com
      3. Start the portal (URL will be e.g. http://localhost:8080/mycontext), go to Control Panel > Portal Settings and set mydomain.com as the portal's virtual host instead of localhost
      4. Log out, delete your browser's cache and cookies for localhost and mydomain.com (if there are any)
      5. Start the portal and log in via http://mydomain.com:8080/mycontext
      6. Place an Asset Publisher on the main page, edit it's configuration and set "Asset Link Behavior" to "View in a specific portlet / View in context", then Save
      7. Add a new page e.g. testpage
      8. Go to testpage, add an Asset Publisher there, edit it's configuration and check "Set as the default Asset Publisher for this page", then Save
      9. Place a Language Portlet on testpage also
      10. Add a Web Content Article with the default language and save it as draft
      11. Add a translation for the article with another language that is available on the language portlet, e.g. en_GB
      12. Set testpage as the Display Page of the article, then publish it
      13. Go to the main page and click on the article in the asset publisher to make it open in testpage's asset publisher
      14. Now on the language portlet change the language to en_GB

      Expected result: The display language is changed and the article displayed in the asset publisher is switched to it's en_GB translation

      Actual result: You get an error message that the portlet got undeployed




            gergely.mathe Gergely Mathe (Inactive)
            gergely.mathe Gergely Mathe (Inactive)
            Participants of an Issue:
            Recent user:
            Esther Sanz
            0 Vote for this issue
            0 Start watching this issue


              Days since last comment:
              5 years, 43 weeks, 5 days ago


                Version Package