Placeholder for the macro fails to render with null pointer exception

XMLWordPrintable

    • 1
    • Severity 2 - Major

      Issue Summary

      When adding a value to a parameter of a particular macro (ConfiForms IFTTT Integration Rules macro), the macro fails to render in the new editor with a NullPointerException and undefined macro:

      TypeError: Cannot read property 'parameters' of undefined
          at T (transformers.ts:80)
          at index.ts:330
          at s (runtime.js:45)
          at Generator._invoke (runtime.js:271)
          at Generator.e.<computed> [as next] (runtime.js:97)
          at n (asyncToGenerator.js:3)
          at u (asyncToGenerator.js:25)
      
      {"statusCode":500,"message":"java.lang.NullPointerException: null"}
      

      In old editor the error is:

      "Macro placeholder request failed error: ''" (no stacktrace)
      

      Sample code from vendor:
      Line 583 from the attached code (IFTTT macro editor)

      putIfNotEmpty(macroParams, 'formName', $('${H}macro-param-formName').val());
      
      If this has a value then something goes crazy with placeholder generation
      
      And some generic functions it uses (nothing fancy):
      
      function putIfNotFalse(macroParams, type, val) {
      if (val && (val === true || val === 'true')) {
      macroParams[type] = val;
      }
      }
      
      function putIfNotEmpty(macroParams, type, val) {
      if (val != null && val !== '') {
      macroParams[type] = val;
      }
      }
      

      See more at https://ecosystem.atlassian.net/browse/DEVHELP-2840

      Steps to Reproduce

      1. Install Confiforms app
      2. Create a new page and add a "ConfiForms IFTTT Integration Rules" macro
      3. Do not populate "Action Form" parameter, see that the macro successfully renders
      4. Try to add the same macro but populate the action form and see that macro fails to render with a NullPointerException

        DEVHELP-2840.webm

      Expected Results

      Macro should render properly

      Actual Results

      Macro does not render when parameter is populate and throws an NPE error

      Notes

      • Issue cannot be replicated with other macros
      • I've asked Confluence Ecosystem team about it and have advised me to raise a ticket here (more notes in DEVHELP issue)

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

        1. Snip20190822_6.png
          Snip20190822_6.png
          902 kB
        2. DEVHELP-2840.webm
          4.45 MB

            Assignee:
            Unassigned
            Reporter:
            Anne Calantog
            Votes:
            3 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: