Legacy Knowledge Base
Published Jul. 2, 2025

getFriendlyUrl() in webcontent gets page layout ID

Written By

Ankit Gupta

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

  • 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

Environment

  • Liferay DXP 7.3

Resolution

  • The observed behavior is a known issue and is fixed in liferay-fix-pack-dxp-2 and above.
  • If the hotfix is required for this issue, please create a support ticket requesting hotfix by attaching patch details.
  • Installing Fix Packs and Hotfixes on Liferay DXP will guide to install these Fixpack in your environment.
Did this article resolve your issue ?

Legacy Knowledge Base