Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-84198

Ported a SOY portlet from Liferay 7.0 CE towards Liferay DXP 7.1.10 GA double rendering problem


    • 2
    • Code Upgrade


      Related issue : https://issues.liferay.com/browse/LPS-84287

      Here is a screenshot of the problem : 




      First thing first I would mention that the documentation about Soy portlet is not up to date. I found this tutorial at : https://dev.liferay.com/de/develop/tutorials/-/knowledge_base/7-1/creating-a-soy-portlet

      And I generated a Soy portlet with the new BladeCLI 3.1.1 tool and the API changed and the documentation is not reflecting that. In the documentation it says :

       immediate = true,
       service = Portlet.class
       public class MySoyPortlet extends SoyPortlet {
       public void render(RenderRequest renderRequest, RenderResponse renderResponse)
      { //do things here }

      but what is generated from Blade is which shows the API change. Would like to know why is my portlet rendered 2 times :


       package com.soy.portlet.portlet;
      import com.soy.portlet.constants.SoyPortletPortletKeys;
      import com.liferay.portal.portlet.bridge.soy.SoyPortletRegister;
      import java.io.IOException;
      import javax.portlet.Portlet;
      import org.osgi.service.component.annotations.Component;
       immediate = true,
       property =
      { "com.liferay.portlet.display-category=category.sample", "com.liferay.portlet.instanceable=false", "com.liferay.portlet.single-page-application=false", "javax.portlet.display-name=my-first-soy-portlet Portlet", "javax.portlet.init-param.template-path=/", "javax.portlet.init-param.view-template=View", "javax.portlet.name=" + SoyPortletPortletKeys.SoyPortlet, "javax.portlet.resource-bundle=content.Language", "javax.portlet.security-role-ref=power-user,user" }
       public class SoyPortletSoyPortletRegister implements SoyPortletRegister {

      When the whole portlet is finished double rendered the whole UI of the backend+frontend of Liferay becomes unclickable. I decided to simplify the Soy template to just show simple stuffs but it didn't change anything the UI is not responding at all. After looking inside of the Developer Tool inside Chrome there are no JS errors at all.






            lawrence.lee Lawrence Lee
            e.bekrek Ergü (Inactive)
            Kiyoshi Lee Kiyoshi Lee
            0 Vote for this issue
            4 Start watching this issue


              3 years, 49 weeks, 2 days ago


                Version Package