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

Embedded portlets in a layout templates cause unnecesary updates of the layout each time the page is visited

    Details

    • Fix Priority:
      4

      Description

      The root cause is that preferences of this kind of portlets (only for layout-templates embedded portlets) are always being updated with the default-preferences provided by the developer and this causes an update of the modifiedDate of the layout. This only must to be done the first time the default configuration for the portlet is stored in database, but not in each request.

      Steps to reproduce:

      1. Deploy the attached sample-layout-template.war
      2. Go to a page and rename it to Support
      3. Assign the sample-layout-template to this page
      4. Visit the Support page, you will view an embedded breadcrumb
      5. Execute this query in the database:
        select plid, mvccversion, modifieddate from Layout where name like '%Support%'
      6. Without doing changes in the page, reload it and run again the query.

      Observed: mvccversion and modifieddate of the layout are being updated.
      Expected: mvccversion and modifieddate of the layout must not be updated.

      Example code for embedding a portlet in a layout template:

      <#assign preferencesMap = {"displayStyle": "ddmTemplate_BREADCRUMB-HORIZONTAL-FTL", "portletSetupPortletDecoratorId": "barebone", "showCurrentGroup": "false"} />
      		${processor.processPortlet("com_liferay_site_navigation_breadcrumb_web_portlet_SiteNavigationBreadcrumbPortlet_INSTANCE_Support", preferencesMap)}
      
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              support-lep@liferay.com SE Support
              Reporter:
              jose.jimenez Jose Jimenez
              Participants of an Issue:
              Recent user:
              Jose Jimenez
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                3 years, 3 weeks, 6 days ago

                  Packages

                  Version Package