2

I have looked everywhere for this bug and I have seen no other issue

Currently I am using Liferay 7.0 and I embedded my portlet in a web content template like so:

 <div class ="container-fluid">
        <div class ="row">
            <div class ="col-md-6 col-sm-6">

         <#assign VOID = freeMarkerPortletPreferences.setValue("portletSetupPortletDecoratorId", "barebone") />
       <@liferay_portlet["runtime"]
             defaultPreferences="${freeMarkerPortletPreferences}"
             portletProviderAction=portletProviderAction.VIEW
             portletName="foo" />
             ${freeMarkerPortletPreferences.reset()}
            </div>
        </div>
    </div>

Portlet works fine outside of the freemarker template, however inside it actionRequest button is called but it never enters render function so the buttons I set do nothing.

Is there any special requirement for a portlet to be put inside a freemarker template? Did I forget anything?

X-Pippes
  • 1,170
  • 7
  • 25

1 Answers1

0

It seems that you are embedding by portletName so it can be either:

Instanceable, and then you need to provide its instance ID, as:

 instanceId="INSTANCE_ID"

If not, set com.liferay.portlet.instanceable=false

If your portlet is instanceable, an instance ID must be provided; otherwise, you can remove this line. To set your portlet to non-instanceable, set the property com.liferay.portlet.instanceable in the component annotation of your portlet to false.

Ori Marko
  • 56,308
  • 23
  • 131
  • 233
  • it's not instanceable. But tried with instance and instanceId as well in some debugging times – André Lima Jan 16 '19 at 15:32
  • the portlet shows up it just does not call render method. Nor render request functions. Action requests are working fine – André Lima Jan 21 '19 at 23:47
  • If a portlet shows up, it's rendered. If you can't hit any breakpoint or log message within that portlet's render method, make sure that the deployed code matches your expectation. – Olaf Kock Feb 07 '19 at 12:03