Side navigation
#4954 closed bug (fixed)
Opened July 23, 2009 07:25AM UTC
Closed June 16, 2010 03:23AM UTC
Last modified March 15, 2012 03:58PM UTC
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?
Best regards,
Tapani Talvitie