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

Token set for @layout_set_friendly_url when visiting virtual host url with "www" prefix removed

    Details

      Description

      ISSUE
      When using @layout_set_friendly_url@ to generate a link in a web content article displayed on a page, if virtual host is set to "www.test.com" and you visit "test.com" instead, "/web/<sitename>" is added to the link. It is not present if you visit "www.test.com"
      STEPS TO REPRODUCE
      1. Define a structure with 1 text row and define a webcontent template with "<li><a href="@layout_set_friendly_url@$currentLayout.getFriendlyURL()" id="fmenu-link$count">$urlName</a></li>"
      2. Add web content to the home page with the structure and template
      3. In site settings, set public page virtual host to www.test.com.
      4. Add to your hosts file a mapping from www.test.com and test.com to the ip address of the server.
      5. Visit site with www.test.com:8080/. Link in web content shows up as: http://www.test.com:8080/$currentLayout.getFriendlyURL()
      6. Visit site with test.com:8080. Link in web content shows up as: http://test.com:8080/web/guest/$currentLayout.getFriendlyURL()

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                5 years, 40 weeks, 6 days ago

                Packages

                Version Package
                6.1.20 EE GA2