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

    Details

      Description

      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") />
        
        <@liferay_portlet["runtime"]
            defaultPreferences="${freeMarkerPortletPreferences}"
            portletName="com_liferay_journal_content_web_portlet_JournalContentPortlet"
            instanceId="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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  43 weeks, 3 days ago

                  Packages

                  Version Package
                  7.0.0 DXP FP64
                  7.0.X
                  7.1.10 DXP FP4
                  7.1.10.1 SP1
                  7.1.2 CE GA3
                  7.1.X
                  Master