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

Content Pages are marked as Draft without any user interaction




      If we have asset publishers portlets which have not sent notifications for certain assets, we send those notifications and update the "notifiedAssetEntryIds" portletPreference value.  When updating the portletPreferences of the layout, the modified date of the layout updates as well and the portal now sees the layout was updated but no publish was performed, so it places the layout in "draft" status.

      This does not occur in 73x and above due to the inclusion of LPS-110819, which no longer uses the modified date value as it's determining factor for whether or not the content page is a draft.  However, the code change still applies to 73x and up, so it should still be sent in for committing.

      Steps to reproduce:

      1. Add a new content page.
      2. Add an asset publisher widget to the page.
      3. Configure the Asset Publisher with the following:
        • Asset Selection > Source
          • Asset Type > Web Content Article
          • Web Content Article Structures > Basic Web Content
        • Display Settings > Sent And Enable
          • Subscribe
      4. Save Asset Publisher configuration and publish page.
      5. Verify page is published and not in "Draft" status.
      6. Publish a new Basic Web Content.
      7. Either wait for the allotted time in the System Settings > Assets > System Scope > Asset Publisher > Check Interval property, or execute the following groovy script which changes the scheduler to fire every 1 minute:
      import com.liferay.portal.kernel.scheduler.SchedulerEngineHelperUtil;
      import com.liferay.portal.kernel.scheduler.SchedulerEngineHelperUtil;
      import com.liferay.portal.kernel.scheduler.StorageType;
      import com.liferay.portal.kernel.scheduler.TimeUnit;
      import com.liferay.portal.kernel.scheduler.Trigger;
      import com.liferay.portal.kernel.scheduler.TriggerFactoryUtil;
      String className = "com.liferay.asset.publisher.web.internal.messaging.CheckAssetEntryMessageListener";
      Trigger trigger = TriggerFactoryUtil.createTrigger(className, className, null, null, 1, TimeUnit.MINUTE);
      SchedulerEngineHelperUtil.update(trigger, StorageType.MEMORY);

      8. View the page in the Site Builder menu.

      Expected Results: Page stays in published state.

      Actual Results: Page now has "Draft" icon next to it.

      Not reproduced in master, but code changes should still be applied: a804a225365be702f88f6fe5d0ce1b310a2b4e1b

      Reproduced in 72x: 4dc20d198de3981a198a59f3a32588a77df4fb2a




            yang.cao Yang Cao
            christopher.kian Christopher Kian
            Kiyoshi Lee Kiyoshi Lee
            Christopher Kian Christopher Kian
            0 Vote for this issue
            0 Start watching this issue


              1 year, 32 weeks ago


                Version Package
                7.2.10 DXP FP14
       DXP SP5
                7.3.7 CE GA8
                7.3.10 DXP FP2
                7.4.1 CE GA2 DXP 7,4
                7.4.13 DXP GA1