Legacy Knowledge Base
Published Sep. 10, 2025

Asset Publisher Back Button Redirects to a Blank Page Instead of the Previous Page

Written By

Cristina Rodriguez

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

When using an Asset Publisher to display a list of assets, clicking on an asset correctly navigates to a detail page. However, when clicking the 'back' arrow provided by the Asset Publisher on the detail page, it does not return to the previous list page. Instead, it reloads the detail page, which appears blank or without any content selected.

This issue typically occurs when a custom Application Display Template (ADT) is used to manually generate the URLs for the asset detail links.

Environment

  • Liferay DXP

Resolution

The problem is caused by manually constructing the asset's URL within the custom ADT. This manual URL is missing the necessary redirect parameter that the Asset Publisher's back button relies on to function correctly.

To resolve this, follow the recommended approach of using Liferay's Display Page feature and the Asset Publisher's API within the ADT:

  1. Configure a Display Page:
    • In your site, navigate to Site Builder → Pages.
    • Go to the configuration of the page intended to display the full content (e.g., a page named 'News Detail').
    • Under the 'Advanced' tab, set this page as the Display Page for the relevant asset type (e.g., a 'News' structure).
  2. Set the Default Asset Publisher:
    • On the same detail page, configure the Asset Publisher portlet.
    • In the Display Settings tab, check the box for Set as the Default Asset Publisher for This Page.
  3. Update the Custom ADT:

    • Edit the ADT used for the asset list view.
    • Instead of manually building the URL, use the assetPublisherHelper.getAssetViewURL(...) API. This helper method automatically generates the correct URL, including the redirect parameter.
    • Example snippet for an ADT:
    <#assign assetEntry = assetRenderer.getAssetEntry() />
    <#assign viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, assetEntry) />
    
    <a href="${viewURL}">${assetEntry.getTitle(locale)}</a>

By implementing these changes, the back button on the asset detail page will correctly redirect the user to the previous asset list page.

Additional Information

 

Did this article resolve your issue ?

Legacy Knowledge Base