Taglib throws an exception after redeploy the JAR file

Issue

  • The taglib throws the freemarker.template.TemplateModelException error after redeploying the JAR file.
  • Steps to reproduce:
    1. Start the server
    2. Navigate to Site Menu> Content & Data > Blogs
    3. Create a new Blog, navigate to Site Menu > Design > Templates > Widget Templates
    4. Click plus icon and select 'Asset Publisher' (with name Taglib test) and add the following code:

    <#if entries?has_content>
    <#list entries as curEntry>
    <#assign assetRenderer=curEntry.getAssetRenderer() 
    viewURL=assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, assetRenderer, curEntry,
    !stringUtil.equals(assetLinkBehavior, "showFullContent" ))
    curBlogEntry=assetRenderer.getAssetObject() /> <h1>${curEntry.title}</h1>
    <@liferay_ratings["ratings"]
    className="com.liferay.blogs.model.BlogsEntry"
    classPK=curBlogEntry.getEntryId()
    /> </#list>
    </#if>


    5. Navigate to Site Builder > Pages
    6. Create a blank page. Now, Navigate to created page and drop 'Asset Publisher portlet'.
    7. Go to Asset Publisher configuration (hover on it and in the upper right corner)
    8. Under the set-up tab choose the 'Asset Selection' Tab.
    9. Select 'Dynamic' as the Asset Selection
    10. Select 'Blogs Entry' as Asset Type and click on 'Save'
    11. Under the setup tab choose 'Display Settings'
    12. Select Display Template 'Taglib test' and click on 'Save'
    13. Blog title will be displayed along with the information from Taglib
    14. Add one empty line or System.out.ptintln() in com.liferay.ratings.taglib.servlet.taglib.RatingsTag class and deploy ratings-taglib module from master.
    15. After deploying successfully. Return to the Page where the Asset Publisher is and there is a FreeMarker error message.

    Expected Behavior: Taglib should work fine.
    Observed Behavior: Taglib throws a FreeMarker error.

Environment

  • Liferay DXP 7.4

Resolution

  • The observed behavior is a known bug addressed by the LPS-183229 which is already included in Liferay DXP 7.4 update 79.

Additional Information

¿Fue útil este artículo?
Usuarios a los que les pareció útil: 0 de 0