PUBLIC - Liferay Portal Community Edition
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-24928

Web Content Display Portlet embedded in Theme and Layout randomly displaying different content than specified by parameters or not displaying content at all.

    Details

    • Similar Issues:
      Show 4 results 

      Description

      We have embedded several instances of web content display portlet in the theme and the layout of our site. Randomly, the web content display portlet shows a different content than the defined in the code. This happens on a regular basis (near 50% of the time), is not restricted to a particular page (happens on different pages as long as they use a layout with embedded web content), does not depend on the server's load (happens when viewing only one page or with several concurrent requests, under controlled conditions) and does not show any error or warning message at jboss's server log.
      The code used for embedding the web content display portlet in the layout is as follows (we have several pieces of code like this in the same layout, in order to include several of this web content sections in the layout):
      #set ($globCounterOfThemeDynamicPortletId = 1000)
      #set ($locArticleGroupId = "10138")
      #set ($locArticleId = "11445")
      #set ($locGroupAndArticleIdForChecking = "$locArticleGroupId" + "" + "$locArticleId" + "")
      $velocityPortletPreferences.setValue("portlet-setup-show-borders", "false")
      $velocityPortletPreferences.setValue("group-id", "$locArticleGroupId")
      $velocityPortletPreferences.setValue("article-id", "$locArticleId")
      #set ($locPortletId = "56_INSTANCE_" + $globCounterOfThemeDynamicPortletId)
      #set ($globCounterOfThemeDynamicPortletId = $globCounterOfThemeDynamicPortletId + 1)
      #set($locRenderedPortletContent = $theme.runtime($locPortletId, "", $velocityPortletPreferences.toString()))
      #set ($locCorrectArticleHasBeenReturned = $locRenderedPortletContent.contains($locGroupAndArticleIdForChecking))
      #if ($locCorrectArticleHasBeenReturned)
      ##correct - let it be
      #else
      ##incorrect - the article or group Id has been changed - so remove the old porltet preferences record and reinitialize it:
      #set ($locPortletPreferenceService = $serviceLocator.findService("com.liferay.portal.service.PortletPreferencesLocalService"))
      #set ($locPlidLong = $getterUtil.getLong($plid))
      $locPortletPreferenceService.deletePortletPreferences(0, 3, $locPlidLong, $locPortletId)

        1. ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 0 ... PortletKeys.PREFS_OWNER_ID_DEFAULT, 3 ... PortletKeys.PREFS_OWNER_TYPE_LAYOUT
          #set ($locRenderedPortletContent = $theme.runtime($locPortletId, "", $velocityPortletPreferences.toString()))
          #end
          $locRenderedPortletContent
          $velocityPortletPreferences.reset()
          Finally, when the web content portlet instead of loading the wrong content doesn't load content at all, the generated HTML code has the "empty" selector assigned, as in the following code:
          <div id="layout-column_column-2" class="lfr-portlet-column empty"></div>

        Activity

        Hide
        Szymon Golebiewski added a comment -

        Hi,

        Can you check if it's still an issue in Liferay 6.1 CE GA1?

        Show
        Szymon Golebiewski added a comment - Hi, Can you check if it's still an issue in Liferay 6.1 CE GA1?
        Hide
        Michael Saechang added a comment -

        This issue has not been updated in over a year. Closing as 'No Longer Reproducible'.

        Show
        Michael Saechang added a comment - This issue has not been updated in over a year. Closing as 'No Longer Reproducible'.
        Hide
        Edward Gonzales added a comment -

        Hello everyone! We are in the process of removing component "Portlet" from LPS. Please make the necessary adjustments to affected filters. Thanks!

        Show
        Edward Gonzales added a comment - Hello everyone! We are in the process of removing component "Portlet" from LPS. Please make the necessary adjustments to affected filters. Thanks!
        Hide
        Edward Gonzales added a comment -

        Hello everyone! We are in the process of moving component "Theme" to "Theme > Dev" in LPS. Please make the necessary adjustments to your filters. Thanks!

        Show
        Edward Gonzales added a comment - Hello everyone! We are in the process of moving component "Theme" to "Theme > Dev" in LPS. Please make the necessary adjustments to your filters. Thanks!

          People

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

            Dates

            • Created:
              Updated:
              Resolved:
              Days since last comment:
              2 years, 20 weeks, 2 days ago

              Development

                Subcomponents

                  Structure Helper Panel