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

getFriendlyUrl() in webcontent gets page layout ID

    Details

      Description

      Description

      The function getFriendlyUrl() in webcontent is bringing a resulting URL which includes the page layout ID, instead of the page name, e.g. /web/test-site/9 instead of /web/test-site/page-name.

      This functionality is included with LPS-124634LPS-103896LPS-128289, and LPS-128379, specifically with the inclusion of this commit and this one too.  There is no clear indication on whether it was intentional to use a layoutId over friendlyUrl when generating the link-to-layout friendlyUrl, so I believe this was an oversight.

      Steps to reproduce

      1. Create a widget page "Test Page", change the friendly url of the page to "/test" and add a web contents display widget
        2. Navigate to Site Administration > Content and Data > Web Content > Structures and create a new structure named Test Structure
        3. Add the Link to Page field and save
        4. Navigate to the Templates tab and create a new template names Test Template based on the Test Structure
        5. Add the Link to Page field and save
        6. Navigate to the Web Content tab and create a new Web Content using the Test Template titled "Test Web Content"
        7. Select Test Page in the Link to Page field and save
        8. Add the Test Web Contents to the web contents display widget
        9. Copy link

      Results of Testing

      Expected Result: The link URL is http://localhost:8080/web/guest/test

      Actual Results: The link URL is http://localhost:8080/web/guest/4

      Errors/Logs

      No errors

      Master

      Reproduced: 47aa84f3b08750630a6bb9caed8b22214f7e096a

      Branch

      Reproduced: 3f4115beb19b928eef0f660d18eec3c41687cd26

        Attachments

          Activity

            People

            Assignee:
            yang.cao Yang Cao
            Reporter:
            christopher.kian Christopher Kian
            Participants of an Issue:
            Recent user:
            Clarissa Velazquez
            Engineering Assignee:
            Christopher Kian
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              19 weeks ago

                Packages

                Version Package
                7.3.7 CE GA8
                7.3.10 DXP FP2
                7.3.X
                7.4.1 CE GA2 DXP 7,4
                Master