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

Application display templates and themes broken by changes to method contracts for TemplatePortletPreferences

    Details

      Description

      When optimizing TemplatePortletPreferences in LPS-71383, we removed the method bodies for various methods when we deprecated the methods. While this makes theoretical sense, the problem is that we have absolutely no automated upgrade code for the templates (which might have been application display templates or themes) which may have relied on those methods.

      Unlike Java code, "deprecation" warnings do not show up inside of Application Display Templates or theme code. When the method contracts for methods change as a result of deprecation, this results in a very severely negative developer experience as they cannot trust that the examples they are given will continue to work even within the same release.

      Steps to Reproduce

      1. Go to the Global Site
      2. Site -> Configuration -> Application Display Template
      3. Edit the "Rich Summary" Template (in a clean bundle, this is on page 2)
      4. Add the following to the end of the template in the script box, which worked at release time:
        <@liferay_portlet["runtime"]
            defaultPreferences="${freeMarkerPortletPreferences}"
            instanceId="whateverV1"
            portletProviderAction=portletProviderAction.VIEW
            portletProviderClassName="com.liferay.portal.kernel.servlet.taglib.ui.BreadcrumbEntry"/>
        
      5. Save the Asset Publisher Template
      6. Go to primary Site ->Add a new Public Page
      7. Add an Asset Publisher portlet to the page
      8. Click on the 3 vertical dots in the portlet, select configuration
      9. Setup -> Display Settings -> Display Template. Select the "Rich Summary" Template, Click save.

      Expected Result: No errors
      Actual Results: UnexpectedCharException is repeated numerous times in back end

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                felix.zhang Felix Zhang
                Reporter:
                minhchau.dang Minhchau Dang
                Participants of an Issue:
                Recent user:
                Csaba Turcsan
              • Votes:
                5 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

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

                  Packages

                  Version Package
                  7.0.0 DXP FP14
                  7.0.0 DXP SP3
                  7.0.3 CE GA4
                  7.0.X EE
                  7.1.X
                  Master