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

Fragment issues with staging and export/import

    Details

    • Branch Version/s:
      7.2.x, 7.1.x
    • Backported to Branch:
      Committed
    • Fix Priority:
      3

      Description

      Description

      Adding fragments to content pages, content page templates, and display pages generates entries in the table FragmentEntryLink and as well as entries in PortletPreferences. These are related via a value called namespace, which is a column in FragmentEntryLink and the instance value of the portletId in PortletPreferences. The plid associated to these entries in PortletPreferences is that of the company's control panel layout.

      Activating staging will violate a unique index constraint on the table PortletPreferences since the control panel layout is not stageable. This issue is not currently visible in 7.1.x because new random namespace are (incorrectly) generated in the staging or importing process, which avoids the unique index constraint. New random namespace break the link between objects related via staging or export/import. LPS-94325 means to avoid generating new random namespaces.

      The present issue will complement the backport of LPS-94325 to 7.1.x and will deal with the unique index constraint on the table PortletPreferences. 

      Cases

      Embedded video and staging

      1. Start a 7.1 bundle with the latest Fix Pack 11
      2. Import the attached ADT in Control Panel -> Build -> Application Display Templates
      3. Create a folder in Documents and Media, upload a video in the folder
      4. Go to Control Panel -> Build -> Page Fragments
      5. Create a new Collection
      6. Create a page fragment in it, embed a media gallery widget between the divs in the HTML section like this:
        <div class="fragment_id"> <lfr-widget-media-gallery> </lfr-widget-media-gallery> </div>
      7. Create a new Content Page
      8. Add your page fragment in it
      9. Go to its configuration
      10. Choose the imported ADT at Display Template
      11. Choose the created folder at Root Folder, Save
      12. Go to your site, observe that the embedded video is shown on the page
      13. Turn Local Staging on with the default configuration
      14. Go to your Staging site, observe that the video has disappeared from the page
      15. Go to your Live site, observe that the video has been successfully published there
      16. Edit the fragment's configuration of your content page (Observe that the previously set configuration has been reset (display template and root folder)
      17. Set them again, choose the imported ADT and your root folder, Save
      18. The video is shown on both the Staging and Live site
      19. Publish to Live again
      20. Observe that the video has disappeared from Live and shown on Staging

      Expected behavior: Video gets published to Live successfully for the first time, it won't disappear from Staging and the fragments configuration won't get reset

      Actual behavior: Video gets published to Live but disappears from Staging, the fragment loses its configuration, after the second publish it disappears from Live

      Image and web content lost in imported fragments after deleting source site

      1. Create a site called site01
      2. Create a web content called wc01
      3. Create a fragment collection and a fragment in that collection, called fragment01, with the html:
        <div class="content-title">
        	<lfr-editable id="imagen" type="image">
        	     <img src="" alt="header icon">
        	</lfr-editable>
        	<h1>
        	   <lfr-editable id="text" type="rich-text">
        		Write here the title of the page
        	   </lfr-editable>
        	</h1>
        </div>
        
      4. Create another collection and a new fragment in it, called fragment02, with html:
        <div class="content">
          <lfr-widget-web-content>
          </lfr-widget-web-content>
        </div>
        
      5. Create a new page of type content called page01.
      6. Add both fragments to the page.
      7. Configure both fragments: one to show the web content wc01, and the other to display a document that you'll upload right there.
      8. Save the page.
      9. Export the site with default settings.
      10. Create a new site called site02.
      11. Import lar from previous export process.
      12. Check that the page01 in site02 shows both the web content and the document.
      13. Delete site01.
      14. Check the page01 in site02 again.
        Expected: The web content and the document are displayed.
        Observed: Neither the web content nor the document are displayed.
      15. Create a new site called site03.
      16. Import the same lar.
        Expected: The web content and the document are displayed.
        Observed: Neither the web content nor the document are displayed.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              lu.liu Lu Liu
              Reporter:
              ricardo.couso Ricardo Couso
              Participants of an Issue:
              Recent user:
              Eric Yan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                1 year, 15 weeks, 3 days ago

                  Packages

                  Version Package
                  7.1.10 DXP FP17
                  7.1.10.4 SP4
                  7.1.X
                  7.2.10 DXP FP2
                  7.2.10.1 DXP SP1
                  7.2.X
                  Master