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

xml_formatter error when freemarker template has comments and if statements

    Details

      Description

      Description

      Creating a workflow with comments and if statements in the freemarker template will result in an js error.

      Steps to reproduce

      Master
      1.Control Panel > Workflow > Create new Workflow
      2.Add Title, paste test.xml in the definition, and click Publish.

      Expected Result: Success banner pops up and Workflow is successfully saved
      Actual Results: No Success banner, Workflow definition is blank, and following DevTool error [F12]

      Uncaught RangeError: Invalid array length
          at component._indent (http://master/o/frontend-js-web/liferay/xml_formatter.js?browserId=other&minifierType=&languageId=en_US&b=7100&t=1519384141958:161:27)
          at http://master/o/frontend-js-web/liferay/xml_formatter.js?browserId=other&minifierType=&languageId=en_US&b=7100&t=1519384141958:124:30
          at Array.forEach (<anonymous>)
          at component.format (http://master/o/frontend-js-web/liferay/xml_formatter.js?browserId=other&minifierType=&languageId=en_US&b=7100&t=1519384141958:79:13)
          at <anonymous>:65:182
          at <anonymous>:69:34
          at args.(anonymous function) (http://master/o/frontend-js-web/liferay/aui_sandbox.js:20:23)
          at YUI._notify (http://master/o/frontend-js-web/aui/aui/aui.js:1105:17)
          at http://master/o/frontend-js-web/aui/aui/aui.js:1021:19
          at YUI._notify (http://master/o/frontend-js-web/aui/aui/aui.js:1105:17)
      

      70x
      1. Edit any existing Kaleo workflow in Control Panel > Configuration > Kaleo Designer.
      2. Click the "Source (Kaleo XML)" tab.
      3. Delete the XML content and paste in the attached workflow XML.
      4. Click the "View" link to see the graphical diagram of the workflow.
      5. Click the "Source (Kaleo XML)" link again.

      Expected Result: the text editor appears.
      Actual Results: no text editor appears. Error logs same as Master

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  1 year, 35 weeks, 4 days ago

                  Packages

                  Version Package
                  7.0.0 DXP FP41
                  7.0.6 CE GA7
                  7.0.0 DXP SP8
                  7.0.X
                  7.1.0 M2
                  7.1.X
                  Master