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

When a portlet was deselected from the most recent publish, it can end up in a confusing state where it keeps showing up empty in the staging configuration options



      When doing a staging publish, sometimes the user may opt to publish some portlets but not others.

      Each individual portlet's "last-publish-date" value is stored in the PortletPreferences table. In the case of publishing some portlets but not others, only the published portlets will have their stored "last-publish-date" updated (which makes sense).

      However, when doing a subsequent publish, if you publish that portlet "from last publish date", it will use the publish date of the most recent publish for the Site, rather than the most recent publish of the individual portlet.

      As an example, suppose I do a publish on January 1, 2020, and I DESELECT Web Content from this publish process; I only publish other portlets. In this case, Web Content's "last-publish-date" stored in the PortletPreferences table will NOT be updated to "January 1, 2020", since it was deselected from the publish.

      Now suppose I later do a publish on February 1, 2020, and I select Web Content to be published this time. In this case, Web Content's "last-publish-date" stored in the PortletPreferences table still will NOT be updated to "February 1, 2020", because any Web Content between January 1, 2020 and February 1, 2020 has not yet been published. So the user needs to still do a publish from the previous "last-publish-date" of the Web Content portlet in order to ensure that the Web Content on the Live Site is fully synced with the Staging Site (you can see the relevant validation logic here).

      This can cause some confusion in the UI because in this case, the portlets may still appear as options in the Content window when "From Last Publish Date" is selected, even though there is no assets belonging to that portlet that will actually be published.

      Steps to Reproduce
      1. Start up Liferay and log in as the admin user.
      2. Create a new Site named "Test Site"
      3. Enable Local Live Staging on "Test Site" with Documents and Media and Web Content enabled.
      4. On the Staging "Test Site", create a new Web Content.
      5. On the Staging "Test Site", upload a new Document.
      6. Perform a publish with the following settings:

      • Documents and Media: Checked
      • Web Content: Unchecked

      7. On the Staging "Test Site", delete the Web Content you created in step 4 (move it to the Recycle Bin, and then empty the Recycle Bin).
      8. Perform another publish with the default settings.
      9. After the publish finishes, visit the "New Publish Process" page. Observe the "Content" part of the publish settings.
      Expected Result: No portlets would appear there because there is no portlet data that has been modified since the last publish.
      Actual Result: A blank "Web Content" option is there even though there is no Web Content to be published. Furthermore, if you click "Select" directly underneath the Web Content option, a blank pop-up window will appear.




            marcell.weller Marcell Weller
            michael.bowerman Michael Bowerman
            Kiyoshi Lee Kiyoshi Lee
            Michael Bowerman Michael Bowerman
            0 Vote for this issue
            2 Start watching this issue


              11 weeks, 3 days ago


                Version Package
       CE GA33
       CE GA34