Last modified: 2012-04-12 13:59:48 UTC
the javascript on Special:Upload is crashing and not doing its work. Firebug reports the error is on upload.js line 56: optionsTable.children is undefined.
On which wiki is this happening?
my development wiki here on my localhost, running trunk r64236
I checked with a friend who's also running a recent copy of the trunk code, and he confirms that the javascript crashes out with 'optionsTable.children is undefined' and doesn't do the interactive stuff.
He sees the error in upload.js?268 and I have it in upload.js?269 if that's helpful.
I think perhaps the line: optionsTable.insertBefore( row, optionsTable.children[1] ); should perhaps be: optionsTable.insertBefore( row, optionsTable.rows[1] ); This is just looking at the TableSection interface. I did no testing to see if this theory is correct. (but I'll put it on my to do list to see if that solves the issue)
var optionsTable = document.getElementById( 'mw-htmlform-description' ).tBodies[0]; so optionsTable is a TBODY, which is of type HTMLTableSectionElement (http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-67417573) and not of type HTMLCollection. So rows (which is a HTMLCollection) should indeed be used.
Though I note that you can also use insertRow. http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-93995626
Upping the priority of this Firefox Javascript error. Should really be fixed before a release.
My Firefox does have an optionsTable.children. Is this non-standard behaviour?
(In reply to comment #9) > My Firefox does have an optionsTable.children. Is this non-standard behaviour? Apparently; according to the MDC .children was introduced in FF 3.5. There is no mention of whether or not this is a non-standard extension, though. optionsTable.childNodes has worked since like the beginning of (DOM) time and does the same, except that it includes TextNodes while .children doesn't.
Fixed in trunk r64948; marked for backporting to 1.16.