Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.4
    • Fix Version/s: 5.4
    • Component/s: None

      Description

      We're using 5.4.26 but have seen this in 5.4.25 too so assume it's a fairly long-standing issue in the alphas.

      Use ajaxformloop, click add row, check your browser's console, see client-side error as follows:

      Uncaught TypeError: Object <DIV class="trowandloadsmoremarkupbesidesthatistheentirecontentsofyourajaxformloop</DIV> has no method 'trigger'

      Look at ajaxformloop.js, see lines 42-44.
      newElement = "<" + insertionPoint.element.tagName + " class=\"" + insertionPoint.element.className + "\"\n data-container-type=\"" + FRAGMENT_TYPE + "\">\n " + content + "\n </" + insertionPoint.element.tagName + ">";
      insertionPoint.insertBefore(newElement);
      return newElement.trigger(events.zone.didUpdate);

      Change them to the following:

      newElement = "<" + insertionPoint.element.tagName + " class=\"" + insertionPoint.element.className + "\"\n  data-container-type=\"" + FRAGMENT_TYPE + "\">\n  " + content + "\n  </" + insertionPoint.element.tagName + ">";
      newElement = insertionPoint.insertBefore(newElement);
                return newElement.trigger(events.zone.didUpdate);
      

      Note the missing assignment of the newElement after its insertion. We are calling trigger on a string. And all is fixed.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                thiagohp Thiago H. de Paula Figueiredo
                Reporter:
                llama-king Peter H
              • Votes:
                2 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: