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

"RangeError: Invalid array length" error in Workflow templates containing comments and if statements

    Details

      Description

      Issue
      Unable to save workflow definition when embedded FreeMarker template code contains comments and if statements.

      Steps to Reproduce
      Web Browser: Google Chrome 81+
      Liferay 7.1 DXP GA1 + Fix Pack 14

      1/ Start server.
      2/ Select Global site
      3/ Navigate to "Control Panel > Configuration > Workflow
      4/ Open Google Chrome DevTools window and display JavaScript console.
      5/ Right-click anywhere on Workflow web page > Select "Inspect" element from popup menu > Select "Console" tab in DevTools window.
      6/ Select Liferay Workflow window.
      7/ Click plus "+" icon to add a new workflow definition.
      8/ Add title "Single Approver PWS-928 FreeMarker Template Indent Test"
      9/ Click on "Source" tab.
      10/ Paste in the attached contents of file "single-approver-pws-928-freemarker-template-indent-test.xml"
      11/ Click "Save" button.

      Expected Results
      The Workflow is saved

      Actual Results
      The Workflow is not saved and Google Chrome DevTools window displays "RangeError: Invalid array length"

      Not Reproduced in
      master (59374e606e9538903f952554948b46ea5e5310c2)

      Reproduced in
      7.1.x (b255f57f99f59504e6fe84a92becfd3a55eac7dc)
      DXP 7.1 dxp-14

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              melody.wu Melody Wu
              Reporter:
              amanda.kwok Amanda Kwok
              Participants of an Issue:
              Recent user:
              Yunlin "Steven" Sun
              Engineering Assignee:
              Amanda Kwok
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                1 year, 15 weeks, 5 days ago

                  Packages

                  Version Package
                  7.1.10 DXP FP18
                  7.1.10.5 SP5
                  7.1.X