cjo9900 commented on Bug JENKINS-14495

The type error occurs with call stack pointing to the hetero-list.js, full call stack is in image
JS_typeError_JENKINS-14495.png

Looking back the stack we see this is invoked from the render event, this event is caused by the loading of the triggerbuilder descriptor elements.
The outerHTML at that point is the data from the descriptor see gist [1]

At the point of failure the element that was being processed has the following outerHTML

<div class="hetero-list-container with-drag-drop one-each ">
  <div class="repeatable-insertion-point">
  </div>
  <div>
    <span class="yui-button yui-menu-button" id="yui-gen22">
      <span class="first-child">
        <button type="button" tabindex="0" id="yui-gen22-button" class="hetero-list-add" suffix="configs">Add Parameters
        </button>
      </span>
    </span>
  </div>
</div>

which seems to indicate that the element has already been processed once.
looking at the registered behaviours, there are 10 elements in the list, including duplicate entries that are added by hetero-list.js and repeatable.js. see image JS_registered_Behaviours_JENKINS-14495.png (element [5] is from hudson-behaviour.js).

so as Behaviour.applySubtree() runs over each item in the list some behaviours are getting run multiple times, which is causing the problem.

[1] https://gist.github.com/3246770

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to