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

Freemarker objects such as themeDisplay() / portlets are accessible in fragments, but are considered invalid freemarker when publishing

    Details

      Description

      Description
      Many objects that are used in freemarker may be globally available, such as the themeDisplay, however currently, fragments do not consider them valid freemarker even though they get processed correctly. A widget created from freemarker has the exact same interaction, so this is also part of the bug

      Steps to Reproduce

      1. Create a fragment with the following HTML.
        <div>
          [#if themeDisplay.isSignedIn() ]
            Signed in!
          [/#if]
        </div>
        
      2. The fragment should render the freemarker correctly, check bottom right
      3. Publish fragment

      Expected Result
      Fragment is publishable, since the fragment contains valid freemarker

      Actual Result
      Fragment is told it has invalid freemarker, since the themeDisplay object doesnt exist, however it does exist in the preview. Usually the preview notifies the user that the syntax is invalid, so there must be a mismatch of objects between the publish verify and the preview verify.

      Tested on Tomcat 9.0.17 + MySQL 5.7
      Portal master GIT ID: d1702d027a7cc764adf88355a8ba1d4539587a73

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kyle.miho Kyle Miho
                Reporter:
                kyle.miho Kyle Miho
                Participants of an Issue:
                Recent user:
                Kyle Miho
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

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

                  Packages

                  Version Package
                  Master