Last modified: 2012-04-12 13:59:48 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T24970, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 22970 - upload javascript crashing
upload javascript crashing
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Uploading (Other open bugs)
1.16.x
All All
: Normal critical (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-03-27 01:34 UTC by Lee Worden
Modified: 2012-04-12 13:59 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Lee Worden 2010-03-27 01:34:54 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.
Comment 1 Roan Kattouw 2010-03-27 19:48:02 UTC
On which wiki is this happening?
Comment 2 Lee Worden 2010-03-30 01:30:43 UTC
my development wiki here on my localhost, running trunk r64236
Comment 3 Lee Worden 2010-04-02 05:13:57 UTC
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.
Comment 4 Lee Worden 2010-04-02 05:16:37 UTC
He sees the error in upload.js?268 and I have it in upload.js?269 if that's helpful.
Comment 5 Bawolff (Brian Wolff) 2010-04-02 05:29:20 UTC
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)
Comment 6 Derk-Jan Hartman 2010-04-03 13:53:30 UTC
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.
Comment 7 Derk-Jan Hartman 2010-04-03 13:54:48 UTC
Though I note that you can also use insertRow. http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-93995626
Comment 8 Derk-Jan Hartman 2010-04-11 17:18:33 UTC
Upping the priority of this Firefox Javascript error. Should really be fixed before a release.
Comment 9 Bryan Tong Minh 2010-04-11 17:36:03 UTC
My Firefox does have an optionsTable.children. Is this non-standard behaviour?
Comment 10 Roan Kattouw 2010-04-11 20:46:04 UTC
(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.
Comment 11 Bryan Tong Minh 2010-04-11 21:03:16 UTC
Fixed in trunk r64948; marked for backporting to 1.16.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links