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

Portlets embedded in layouts don't get their preferences assigned from the layout

    Details

    • Fix Priority:
      1

      Description

      Portlets embedded in layouts don't get their preferences assigned dynamically based on the script in the layout's TPL file every time a page is requested (as was the case in 6.2). Instead, the preferences are ALWAYS persisted in the DB and once that happens, the preferences from the layout become ineffective (every page using the layout looks exactly the same even if the script customizes the page depending on the context (eg. $layout.getExpandoBridge().getAttribute("categoryId")).

       

      This behawior was introduced via LPS-62334 in the 7.x by the adding the additional parameter in the doTag method invocation from within the doTag(String portletName, String instanceId, String queryString, String defaultPreferences, PageContext pageContext, HttpServletRequest request, HttpServletResponse response) method of [util-taglib/src/com/liferay/taglib/portletext/RuntimeTag.java|https://github.com/liferay/liferay-portal/commit/8028385460e6f387461a959d7cd66b3b29643cfc#diff-2ce244f86d860314765a05e1a6eacde9] (line 14) (marked in red below):

       

      doTag(
          portletName, instanceId, queryString, _SETTINGS_SCOPE_DEFAULT,
         defaultPreferences, pageContext, request, response);
         defaultPreferences, true
      , pageContext, request, response);

        Attachments

          Activity

            People

            • Assignee:
              support-lep@liferay.com SE Support
              Reporter:
              piotr.woch Piotr Woch
              Participants of an Issue:
              Recent user:
              Sherry Zhu
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Days since last comment:
                2 years, 3 weeks ago

                Packages

                Version Package