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

Portlet preferences are reset when embedding that portlet in a theme


    • Bug
    • Status: Closed
    • Resolution: Won't Fix
    • 7.1.X, Master
    • None
    • Widget configuration
    • 3


      Embedding an Asset Publisher by its instance ID through the theme will cause the actual Asset Publisher placed on the page manually (and not by embedding it) to have its preferences reset to default.

      Reproduction Steps:
      1) Patch a 7.1 DXP with the latest fix pack, ensure to connect it to a productive DB like MySQL, start the server
      2) Login as an Admin, add an Asset Publisher on the Welcome page
      3) Click on the top-right ellipsis icon of that AP > Configuration > Source > Asset Type > Web Content Article. Save and close.
      4) Get the Instance ID of the portlet: top-right ellipsis icon of that AP > Look and Feel Configuration > Advanced Styling: the Instance ID is the last portion of alphanumeric chars in the "Portlet ID" field, for example: BroTzv1khFZk

      5) Create a dummy theme by adding this snippet:

      		<h2>Embedding AP ...</h2>

      in the src/templates/portal_normal.ftl, right before the closing </section> tag. The snippet is in line with the LDN: https://dev.liferay.com/en/develop/tutorials/-/knowledge_base/7-1/embedding-portlets-in-themes-and-layout-templates#embedding-a-portlet-by-portlet-name

      6) Deploy the theme, apply it to the Welcome page
      7) On both AP's check under Configuration > Source > Asset Type >

      Expected behavior: The selection to be "Web Content Article"
      Actual behavior: The selection is "Any"

      8) Once again set Configuration > Source > Asset Type > Web Content Article on the "original" AP placed manually on the page:

      Result: the two AP's will be in sync again, the embedded AP will mirror the change

       Reproduced on 7.1.x
       Reproduced on master


        1. test-theme.war
          3.77 MB
        2. test-theme.zip
          7.52 MB



            roland.pakai Roland Pákai
            roland.pakai Roland Pákai
            Kiyoshi Lee Kiyoshi Lee
            0 Vote for this issue
            0 Start watching this issue


              3 years, 32 weeks, 1 day ago


                Version Package