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

Cannot import site template in both public and private pages

    Details

      Description

      Steps to reproduce:
      1/ Create a site template
      2/ Go to Control Panel, Organization
      3/ Choose an organization with no layout in both public and private sections, and choose Layouts
      4/ In Public Layouts, choose your site template
      5/ Save
      6/ In Private Layouts, choose your site template
      7/ Save.

      Effect:
      A message shows that the rrequest has been processed. However, the private pages are still empty.

      Explanation:
      The same site template is used, and the same Layouts are imported. When trying to create the new one in the private pages, it looks for already existing Layout with the same UUID, but it makes no difference between public and private pages. See in this part of code :

      /portal-impl/src/com/liferay/portal/lar/LayoutImporter.java
      // The default behaviour of import mode is
      // PortletDataHandlerKeys.LAYOUTS_IMPORT_MODE_MERGE_BY_LAYOUT_ID
      
      existingLayout = LayoutUtil.fetchByUUID_G(
      	layout.getUuid(), groupId);
      
      if (existingLayout == null) {
      	existingLayout = LayoutUtil.fetchByG_P_F(
      		groupId, privateLayout, friendlyURL);
      }
      

      existingLayout is not null, because the very same layout has been created in Public Pages...

        Attachments

          Activity

            People

            Assignee:
            pani.gui Pani Gui (Inactive)
            Reporter:
            frinux frinux (Inactive)
            Participants of an Issue:
            Recent user:
            Esther Sanz
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

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

                Packages

                Version Package
                --Sprint 12/11
                6.1.0 CE RC1