Legacy Knowledge Base
Published Jun. 30, 2025

JournalArticleAssetRenderer.getSummary method no longer returns the first 200 characters of the Web Content when description field is empty

Written By

Daniel Couso

How To articles are not official guidelines or officially supporteddocumentation. They are community-contributed content and may not alwaysreflect the latest updates to Liferay DXP. We welcome your feedback toimprove How to articles!

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

Legacy Article

You are viewing an article from our legacy "FastTrack"publication program, made available for informational purposes. Articlesin this program were published without a requirement for independentediting or verification and are provided "as is" withoutguarantee.

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

Issue

  • Considering the following scenario:
    • A Basic Web Content with no description but non-empty content field.
    • An Asset Publisher configured to display all the Basic Web Contents of the site with the following Asset Publisher Template:
<#if entries?has_content>
<#list entries as curEntry>
${curEntry.getTitle(locale)}
<br/>
${curEntry.getAssetRenderer().getSummary(renderRequest, renderResponse)}
</#list>
</#if>
  • In Liferay DXP 7.3, the method getSummary returns the first 200 characters of the content if the Web Content's description field is empty.
  • In Liferay DXP 7.4 Update 6 and Quarterly Releases, the method getSummary returns an empty string under the same circumstances.

Environment

  • Quarterly Releases: 2023.Q3, 2023.Q4, 2024.Q1
  • Liferay DXP 7.4

Resolution

  • This behavior has changed since Liferay DXP 7.4 Update 6 due to LPS-142648.
  • It would be possible to achieve some similar results within a widget template with the following snippet:
<#if entries?has_content>
<#list entries as curEntry>
${curEntry.getTitle(locale)}
<br/>
<@liferay_asset["asset-display"]
abstractLength=200
assetEntry=curEntry
template="abstract"
/>
</#list>
</#if>

Additional Information

Did this article resolve your issue ?

Legacy Knowledge Base