Bug Tracker

Modify

Ticket #7398 (closed bug: fixed)

Opened 3 years ago

Last modified 2 years ago

tds[0] does not exist

Reported by: woakesd Owned by: dmethvin
Priority: high Milestone: 1.5
Component: support Version: 1.4.4rc
Keywords: Cc:
Blocking: Blocked by:

Description

I get the following error warning in firebug using the lastest version in an application:

tds[0] is undefined

jQuery.support.reliableHiddenOffsets = tds[0].offsetHeight === 0;

I've tried to create a simple test case of this but failed.

Attachments

test-7398.html Download (563 bytes) - added by dmethvin 3 years ago.
XHMTL Frameset document test

Change History

comment:1 Changed 3 years ago by boushley

We need more specifics on your environment. This line is line 160 in support.js and gets run as jQuery is loaded. So this is a bug that should appear by just including jQuery. More specifics or a test case would be necessary to determine specifically what is happening.

If we don't get anymore details, this is a worksforme.

comment:2 Changed 3 years ago by snover

  • Owner set to woakesd
  • Status changed from new to pending

Please provide information about your environment (browser, OS, etc.) as well as the specific version of jQuery you are using and the scheme you are using (http, https, file, gopher, etc.).

comment:3 Changed 3 years ago by woakesd

  • Status changed from pending to new

Hi, I will try to work out a test case for this, but in the meantime this was Firefox 3.6.12, Firebug 1.5.4, Windows Server 2008 r2 64 bit, jQuery is 1.4.4rc2 ( http://code.jquery.com/jquery-1.4.4rc2.js), jQueryUI 1.8.5.

However as noted that configuation by itself doesn't cause this.

The (intranet) site where this happens uses a frameset embedded in an iframe and most pages load jquery (including the page with the frameset.

However as I write this it has stopped happening.

Close the ticket I think, I dont really have time to isolate this and create a simple example.

comment:4 Changed 3 years ago by woakesd

It's back!

But close anyway I can't think of a simple example for it.

I have found that removing jQuery from the frameset page within the iframe ensures this doesn't happen. I'll modify the code and live with it.

The errors appeared to happen when one of the pages within a frame loaded (and this page does have a function

jQuery(function() { xxx(); });

where xxx is a function that accesses the top page jQuery.

comment:5 Changed 3 years ago by snover

  • Status changed from new to closed
  • Resolution set to worksforme

Closing as per reporter request, and due to lack of a reproducible test case.

comment:6 Changed 3 years ago by anonymous

Please re-open this ticket.

I'm experiencing this problem with the latest jQuery public release (1.4.3) using Firefox 3.6.12. The problem didn't manifest with jQuery 1.4.2. It does not happen under IE 8.0.7600.16385, Chrome 7.0.517.41 beta, or Safari 5.0.2 (7533.18.5). All my testing so far has been on a Windows 7 (32-bit) machine. The problem does seem related to framesets. In particular, there is a line in the jQuery code that attempts to set the innerHTML on a div but the innerHTML doesn't get changed. I will attempt to create a simple harness to illustrate the problem.

comment:7 Changed 3 years ago by kml

Here's the HTML you can use to reproduce this bug:  http://jsfiddle.net/Ba4MR/. The version of Firefox I've seen this happen under is 3.6.12.

comment:8 Changed 3 years ago by kml

Looking at the offending code, I suspected that wrapping the frameset element in a body element might provide a workaround; it appears to have worked. Nonetheless, it might still be worth addressing since surrounding the frameset with a body isn't strictly valid from the relevant XHTML spec.

comment:9 follow-up: ↓ 10 Changed 3 years ago by rwaldron

I'm using FF 3.6.12 and am not experiencing the issue. I've tried both the fiddle and copying the whole case out and into its own file locally.

comment:10 in reply to: ↑ 9 Changed 3 years ago by kml

Replying to rwaldron:

I'm using FF 3.6.12 and am not experiencing the issue. I've tried both the fiddle and copying the whole case out and into its own file locally.

I just copied out the fiddle, saved it into a new html file and opened it in FF 3.6.12. Inspecting the error console, I see the error occurs twice. Tomorrow I'll get some coworkers to try it out on their machines.

comment:11 Changed 3 years ago by rwaldron

I'm not getting any errors. How about taking a screenshot?

comment:12 Changed 3 years ago by kml

I've created a recording in MHT format but I can't figure out how to attach it to this ticket.

comment:13 Changed 3 years ago by rwaldron

Zip it?

comment:14 Changed 3 years ago by kml

It is zipped - I can't find any means of *attaching* it to this ticket. I'm not familiar with Trac. Does the ticket have to be in a particular state? Do I have to create a new ticket?

comment:15 Changed 3 years ago by rwaldron

So... if you're using Firefox, can you just add this:  https://addons.mozilla.org/en-US/firefox/addon/1146/

Take a screenshot, upload it here:

 http://tinypic.com/

...OR...

 http://gyazo.com/en

either of those ways is easier.

comment:16 Changed 3 years ago by kml

Here we go - I decided to use mongofiles. Thanks for the info. I guess direct file attachments aren't permitted in the ticket.  http://www.mongofiles.com/file/32413/bugrecording.zip

comment:17 Changed 3 years ago by rwaldron

Something about this:

CommandLine="FIREFOX.EXE -REQUESTPENDING -OSINT -URL C:\USERS\KRISTIAN\DESKTOP\BUG.HTML"

tells me its not going to work on my linux machine. sorry dude, I tried to help. I still will if you wanna hook it up with a basic screen shot, otherwise, I cant help any further.

comment:18 Changed 3 years ago by kml

Don't sweat it. Some coworkers are using Linux for dev - I'll see if they can reproduce it tomorrow. Hopefully I'll have something good to report. Thanks again.

comment:18 Changed 3 years ago by kml

Don't sweat it. Some coworkers are using Linux for dev - I'll see if they can reproduce it tomorrow. Hopefully I'll have something good to report. Thanks again.

comment:19 Changed 3 years ago by anonymous

I tried this using Firefox 3.6.11 on CentOS Linux and I also see the errors in my Firefox error console:

Error: tds[0] is undefined Source File:  http://code.jquery.com/jquery-1.4.3.js Line: 1053

comment:20 Changed 3 years ago by kml

Here is a screenshot of the error console:  http://tinypic.com/r/2utgeom/7

comment:21 Changed 3 years ago by rwaldron

  • Status changed from closed to reopened
  • Resolution worksforme deleted

This whole time, I was looking in Firebug.

comment:22 Changed 3 years ago by rwaldron

  • Status changed from reopened to open

comment:23 Changed 3 years ago by anonymous

I can confirm this bug with my frame-based web application, too using Firefox 3.6.10.

jQuery 1.4.3 is simply included - no custom coding - and the JavaScript console throws the exact same error as previously described.

Switching back to 1.4.2 removes the error message so I suppose something in 1.4.3 is the cause of this.

comment:24 Changed 3 years ago by anonymous

Me again, anonymous ;)

I've done some investigation on how jQuery is used in my project and I am automatically including it in most major files including frameset-only HTML files that do NOT have a BODY-tag.

This is most likely the cause !

comment:25 Changed 3 years ago by rwaldron

#7469 is a duplicate of this ticket.

comment:26 Changed 3 years ago by dmethvin

  • Component changed from unfiled to support

TL;DR: Error occurs with frameset documents that do not have a body. The code in support.js expects pages to have a body. In these cases the getElementsByTagName method returns undefined instead of a nodelist.

Moral of the story: jQuery wants a body.

comment:27 Changed 3 years ago by futureweb

Same error here - Jquery 1.4.4 included within frameset file (XHTML 1.0 Frameset - without <body>) --> error:

Error: tds[0] is undefined Source: jquery-1.4.4.source.js Row: 1070

Any fix in sight?

Last edited 3 years ago by futureweb (previous) (diff)

comment:28 Changed 3 years ago by dmethvin

Fix:  https://github.com/jquery/jquery/pull/144

I've attached a minimal repro case to the ticket, since it can't be done through jsfiddle.

comment:29 Changed 3 years ago by dmethvin

  • Owner changed from woakesd to dmethvin
  • Status changed from open to assigned

Changed 3 years ago by dmethvin

XHMTL Frameset document test

comment:30 Changed 3 years ago by john

  • Priority changed from undecided to high
  • Status changed from assigned to closed
  • Resolution set to fixed

Landed this pull request from Dave:  https://github.com/jquery/jquery/pull/199

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.