Bug Tracker

Opened 10 years ago

Closed 9 years ago

Last modified 8 years ago

#4954 closed bug (fixed)

error - reference to undefined property jQuery.cache[id][name]

Reported by: Tapani Talvitie Owned by:
Priority: major Milestone: 1.3.2
Component: core Version: 1.3.2
Keywords: Cc:
Blocked by: Blocking:

Description

Hi,

I have Firefox 3 and Developers Toolbar in it. I noticed that jquery 1.3.2 gives the following Warning in DevToolbar:

reference to undefined property jQuery.cache[id][name] jquery-1.3.2.js row 1299

This occurs even if the body tag is empty and no other javascript except including the jquery-1.3.2.js in head tag. Not usre why this happens though.

Quick googling revealed similar problems with other people too but I didn't find a solution to the problem. So I did some debugging. Results:

When documents loads the jquery does some init stuff. First call that comes to this problematic function in row 1274 goes fines (attribute name is "events"). The second one (name="handle") fails. "handle"'s data is undefined and that causes the problem.

Quick solution to get rid of the error message is to add "else" to row 1293:

if (data !== undefined) {

jQuery.cache[id][name] = data;

} else {

jQuery.cache[id][name] = "";

}

..but this is probably just a fix to the sympton. Better solution probably needs some fix to the initial "handle" caller(?) Why is the "handle"'s data undefined in the first place?

Change History (2)

comment:1 Changed 10 years ago by Tapani Talvitie

Best regards, Tapani Talvitie

comment:2 Changed 9 years ago by dmethvin

Resolution: fixed
Status: newclosed

Fixed in jQuery 1.4.

Note: See TracTickets for help on using tickets.