Legacy Knowledge Base
Published Jun. 30, 2025

Issue with Rating functionality

Written By

Amit Tiwari

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. Navigate to Configuration-> Settings-> Social-> Ratings and change the Web Content type to Like with the help of the dropdown and save it.
2. Navigate to Design-> Widget Templates-> Create an Asset Publisher Template with the below content:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<#if entries?has_content>
<#list entries as entry>
${entry.getTitle(locale)}
<div class="asset-ratings">
<@liferay_ui["ratings"]
className=entry.getClassName()
classPK=entry.getClassPK()
/>
</div>
</#list>
</#if>

3. Create Basic Web Content.
4. Drop an Asset Publisher Widget on a page.
5. Open Asset Publisher- Configuration with the help of three dots and navigate to Display settings and choose the newly created Asset Publisher template created in step 2 from the drop-down of Display Templates, Save, Publish and refresh the page.

Expected behavior: Like should be made while clicking on the thumb icon.
Actual Behaviour: The thumb icon is coming with a rectangular button and like is working while clicking on the rectangular area but if clicked on the thumb icon it's not working.

Environment

  • Liferay DXP 7.3 GA1

Resolution

  • The observed behavior is a known issue/bug and has been fixed in liferay-fix-pack-dxp-3 and above.
  • If a hotfix is required for this issue, please create a support ticket requesting a hotfix by attaching patch details.
  • Installing Fix Packs and Hotfixes on Liferay DXP will guide you to install this hotfix in the respective environment.
  • Also, use the below code to create an asset publisher template:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<#if entries?has_content>
<#list entries as entry>
${entry.getTitle(locale)}
<div class="asset-ratings">
<@liferay_ratings["ratings"]
className=entry.getClassName()
classPK=entry.getClassPK()
/>
</div>
</#list>
</#if> 

Additional Information

Did this article resolve your issue ?

Legacy Knowledge Base