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

FreeMarker template error occurred when review web content with a template that contains 'getServiceContext()'

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Won't Fix
    • Affects Version/s: 7.1.X, 7.2.0 Beta 2, Master
    • Fix Version/s: None
    • Component/s: Widget Templates
    • Labels:
      None
    • Fix Priority:
      3

      Description

      Steps to Reproduce:

      1. Go to Control Panel > Web Content.
      2. Import the attached lar.
      3. Preview the web contents.

      Expected Results:
      Web contents can be previewed without error.

      Actual Results:
      FreeMarker template error occurred.

      The error occurs on below line:

      <#assign service_context = staticUtil["com.liferay.portal.kernel.service.ServiceContextThreadLocal"].getServiceContext() />
      

      Reproduced on:
      Tomcat 9.0.17 + MySQL 5.7. Portal master GIT ID: 837e4afb5fd7c9681880f23ea20a5ed589007d70.
      Tomcat 9.0.10 + MySQL 5.7. Portal 7.1.x-private GIT ID: e73519386fe3eec522e411c049175a4257cf49f7.
      Tomcat 9.0.17 + MySQL 5.7. Portal DXP 7.2.10 Beta2.

        Attachments

          Activity

            People

            Assignee:
            summer.zhang Summer Zhang
            Reporter:
            summer.zhang Summer Zhang
            Participants of an Issue:
            Recent user:
            Summer Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

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

                Packages

                Version Package