With Staging when I publish an empty Web Content Display/Asset Publisher Portlet with a configuration template, the template should not be published to Live

Issue

  • I have the following property enabled: Publish Displayed Content by Default from Control Panel --> Configuration --> System settings --> PLATFORM --> Infrastructure --> VIRTUAL INSTANCE SCOPE -->Export/Import. Any content displayed on the web content display portlet will be published to Live by default if the property is enabled, even when the content is deselected from the content publishing. 
  • If the web content display portlet is empty (not displaying any content), the content will not be published to Live, because it is not referenced by the portlet, but if we have a WCD with a configuration template, and we publish to Live while deselecting the content, the web content and documents will still be published to Live, even though they are not displayed on WCD. This is also true for the Asset Publish Portlet.

Reproduction Steps:

  1. Open the main menu --> Control Panel --> Configuration --> System settings --> PLATFORM --> Infrastructure --> VIRTUAL INSTANCE SCOPE -->Export/Import and enable the option: Publish Displayed Content by Default, by checking the box.

  2. Go to Control Panel -->Sites --> Sites and create 2 blank sites "SiteA" and "SiteB", then copy the Site ID of SiteB from Site Settings --> Site Configuration.

  3. In SiteA go to Publishing --> Staging and enable Remote Staging.

  4. On SiteA go to Site Builder --> Pages and add a widget page.

  5. On the Page place a web content display Portelt and add a web content to it with an image.

  6. On the WCD portlet click on the options 3 dot menu, select Configuration Templates, and then save the configuration by clicking on "Save the Current Configuration as Template".

  7. Remove the WCD portlet from the Page.

  8. Click on "Ready for publish Process on the top right of the page, and click Publish to Live.
    10. Click on "Switch to Advanced Publish Process" and under the CONTENT uncheck "Web Content" and "Documents and Media", then publish to Live.
    Checkpoint: On the Live Site "SiteB", if you check the web content admin and the documents and Media, you will see that they are not published to Live, which is expected.
    11. Go to the Staging Site and place a Web Content Display Portlet on the page without adding any content to it (leave it empty).
    12. Repeat the publishing again as in steps 9 and 10

    Actual Result: The web content and document are published to Live, although the WCD portlet was empty (Not displaying any content).

    Expected Result: The web content and document should not be published to Live. 

          See the attached demo: WCDdeselContLive.mp4

Environment

  • Liferay DXP 7.4
  • Liferay DXP 7.3

Resolution

  • The current behavior is expected. There is a feature request to address this feature: LPS-193773. If you wish to inquire about the feature, please go to Liferay Ask.
  • Currently, this can be resolved by disabling the properties Publish Displayed Content by Default from Control Panel --> Configuration --> System settings --> PLATFORM --> Infrastructure --> VIRTUAL INSTANCE SCOPE -->Export/Import for the Web Content Display Portlet and Enable Dynamic Export and/or Enable Manual Export from Control Panel --> Configuration --> System settings --> CONTENT AND DATA --> Assets --> Asset Publisher for the Asset Publisher.
Was this article helpful?
0 out of 0 found this helpful