Custom Layout Templates shows source code in Nested Application Portlet


  • Configure the Nested Application Portlet to appear with any of the custom layouts whenever it is used. Instead of the layout's rendering, the source code is shown.

  • Steps to reproduce
    1) Deploy the custom layout war file
    2) Startup Liferay 7.1 with Fix pack 16 installed
    3) Create a page and click on the Look and Feel tab
    4) Select the 'Define a specific look and feel for this page' option
    5) Scroll down and click on Change Current Theme
    6) Select the test-layout
    7) Save it and go to the page
    8) Place a Nested Applications portlet on the page
    9) Go to the configuration of the Nested Applications portlet
    10)Scroll down and select the 'Test 2 Columns' option
    11)Click on save
    Expected behavior: The selected layout is used and the Nested application portlet is empty
    Actual behavior: The selected layout is used but the source code is visible
  • Note: On Fix pack 10, this behavior works properly. It appears that the specific behavior mentioned occurs with Fix Pack 11 and onwards. 


  • Liferay DXP 7.1 Fix Pack 16


  • Velocity layout templates are deprecated in 7.1, which means the generator is generating a FTL file instead of a TPL file, referring to: and
  • Liferay had a modification in dxp-11 that affects the nested portlet visible in the LPS-92167
  • In the customer's theme, if the custom test2col.tpl extension is changed to .ftl and also modify /layouttpl/custom/test2col.tpl to .ftl in liferay-look-and-feel.xml, then the layout looks like correctly processed on the Portal, with no error in the console.
  • As a result, it has been proposed that the above-mentioned method or creating a new theme and layout with the toolkit be used in this circumstance (users can update the liferay-theme-generator with npm install generator-liferay-theme).

Additional Information

  • The .war file as well the source code as an attachment.
0 人中有 0 人觉得有帮助