Skip to main content

Bug Tracker

Side navigation

#3525 closed bug (invalid)

Opened October 27, 2008 07:25AM UTC

Closed October 30, 2008 01:04PM UTC

Last modified January 30, 2009 05:30PM UTC

userAgentButton is null

Reported by: dklynn Owned by:
Priority: minor Milestone: 1.3
Component: core Version: 1.2.6
Keywords: userAgentButton Cc: dklynn, flesler
Blocked by: Blocking:

Using FF 3.0.3 and jQuery 1.2.6, I'm getting a "userAgentButton is null" message on my websites as well as (jquery.min.js (line 26) which is reported by FireBug as "for(handler in events[type])if(!parts[1]...ry.isReady),jQuery);else". It doesn't appear to affect jQuery code but the reported error seems constant and is surely the sign of something gone wrong - but I'm not sure whether it's FireBug or jQuery.

Attachments (0)
Change History (9)

Changed October 27, 2008 12:23PM UTC by flesler comment:1

cc: → dklynn, flesler
milestone: → 1.3
need: ReviewTest Case

There's nothing like userAgentButton in jQuery.

Can you use the uncompressed version so we can spot the exact line ?

Try this:

If you can include more details like the value of variables and stuff like that, it'd help.

Changed October 28, 2008 07:46AM UTC by davidserduke comment:2

Are you using the User Agent Switcher plugin? If so, that might be the problem.

Changed October 30, 2008 04:40AM UTC by dklynn comment:3

Thanks for the update. I've used the jquery-nightly.js and received:

Firebug's log limit has been reached. %S entries not shown. Preferences

userAgentButton is null

data()()jquery.js (line 683)

trigger()()jquery.js (line 2027)

triggerHandler()()jquery.js (line 2268)

ready()()jquery.js (line 2335)

[Break on this error] jQuery.cache[ id ][ name ] :

This was on line 683 which is:

jQuery.cache[ id ][ name ] :

Because this is new (and FF updates everything - so I'm sure I have the latest UserAgentSwitcher), I don't believe that (UAS) is the problem.


Changed October 30, 2008 04:42AM UTC by dklynn comment:4

Oh, the jquery.js is the name I gave jquery-nightly.js on saving it - that's why it's denoted jquery.js in the Firebug error above.

Changed October 30, 2008 04:44AM UTC by dklynn comment:5

... and the same error is given with Pedrick's userAgentSwitcher disabled.

Changed October 30, 2008 04:46AM UTC by dklynn comment:6


I'll upload the nightly version (uncompressed) to the website where you should be able to see anything you need:



Changed October 30, 2008 04:54AM UTC by dklynn comment:7

On THIS page, I get:

Firebug's log limit has been reached. %S entries not shown. Preferences

userAgentButton is null

ready()(Object originalEvent=Event load type=load)jquery.min.js (line 26)

ready()(load )jquery.min.js (line 26)

trigger()()jquery.min.js (line 25)

[Break on this error] for(handler in events[type])if(!parts[1]...ry.isReady),jQuery);else

which specifies jquery.min.js (line 26).

I hope this is not a FireFox problem (or a jQuery problem)!



Changed October 30, 2008 01:04PM UTC by flesler comment:8

resolution: → invalid
status: newclosed

I get no error on FF2 nor FF3.

I also found this(first link from google).

I'm pretty sure this is an issue of that plugin, and for sure not from jQuery. There's no variable or method by that name in the source.

I'm going to close this for now.

Changed January 30, 2009 05:30PM UTC by strings28 comment:9

I want to quickly add that debugging through this shows that often the problem is with a Firefox __defineGetter__ type assignment where the window.event object has been handled by jQuery. Appropriately fixed code (not a problem in jQuery) looks like this:




fix: check for

if(typeof(window.event) == 'undefined'){return;} of function...

Hope this helps someone