Menu

#10 JavaScript error on xf:insert

open
None
5
2009-04-16
2009-04-16
No

A JavaScript error results when all of the following conditions happen:
* An xf:output without a xf:label child is in a repeat
* An insert happens against the repeat

As of svn 112, it is on line 3325 of the script.

if (this.element.firstChild.firstChild) {
var cells = this.element.firstChild.firstChild.childNodes;
this.valueElement = cells[cells.length - 2];

Firebug shows that the cells array is empty, and the attempt to reference a negative index in the array causes an error. The attached form demonstrates this, just click the button.

Discussion

  • Micah Dubinko

    Micah Dubinko - 2009-04-16

    Test case

     
  • Alain Couthures

    Alain Couthures - 2009-04-16

    Possible workaround : put an empty xf:label

    If so, this can be done automatically via the XSLT transformation in a next release

     
  • Alain Couthures

    Alain Couthures - 2009-04-16
    • assigned_to: nobody --> alain-couthures