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

Embedded Web Content display causes publish to fail



      If you embed a web content display portlet, but you don't set the groupId when preparing the portlet preferences (Liferay doesn't actually require this because it'll default to the current site's groupId if it doesn't see one set), Liferay isn't able to publish any pages where the portlet was embedded.

      Steps to reproduce:

      1. Enable local live staging (remote staging will also reproduce the issue)
      2. Add a new basic web content
      3. Go to the edit screen for the web content and take note of its ID
      4. Add a new web content template for the "Basic Web Content" structure with the following content, replacing both instances of REPLACE_ARTICLE_ID_HERE with the ID from step 2:
        <#assign VOID = freeMarkerPortletPreferences.setValue("articleId", "REPLACE_ARTICLE_ID_HERE") />
        <#assign VOID = freeMarkerPortletPreferences.reset() />
      5. Create a new web content using this template, and add it to a page. Confirm that the article is visible on the page.
      6. Attempt to publish to live
        Expected result: The publish completes successfully (note: because of the way the template is written (hard-coding the content ID), in 7.0.x, the embedded Web Content Display on the live site after the publish may not find the article; if the ID in the template, however, matched the ID for the content propagated to the live site, then it would work there)
        Actual result: The publish fails with an error like the following:
        An unexpected error occurred with the publication process. Please check your portal and publishing configuration.
        Unable to update journal content search data during import

      Reproduced in 7.0.x: 0667f8553126f0b373ee3d7b8f520abc16fe28d3
      Not visible in UI in master:* c31bf2e77336040d6ed99cf52ddff7ad2c8f46e4

      *In master, the error is not reproducible in the UI (an Exception is thrown in the same location but it is not caught). However, the underlying code is the same, so the issue could return in some form without this fix.


          Issue Links



              • Votes:
                0 Vote for this issue
                0 Start watching this issue


                • Created:
                  Days since last comment:
                  1 year, 12 weeks, 2 days ago


                  Version Package
                  7.0.0 DXP FP64
                  7.1.10 DXP FP4
                  7.1.2 CE GA3