Issue Collector throws: "Uncaught TypeError: Cannot read property 'msie' of undefined"

After adding a Jira Issue Collector to one of my sites, I get this exception during page load:

Uncaught TypeError: Cannot read property 'msie' of undefined

com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector-embededjs.js:1

I'm guessing this is an IssueCollector problem, but anyone know the cause?

2 answers

1 accepted

I am using jQuery 1.9.0. This the plugin's Javascript is relying on the long-deprecated jQuery.browser property, which was removed in jQuery 1.9.0.

See http://jquery.com/upgrade-guide/1.9/#jquery-browser-removed

Example of offending code:

if($.browser.msie&&(ATL_JQ.isQuirksMode()||$.browser.version<9))

The Issue Collector needs to be updated to work with jQuery 1.9. Vote for JRA-31576 if you so desire.

So, you have two options to get rid of this exception:

  1. Use jQuery Migrate to restore the deprecated APIs, as per this JIRA Knowledge Base article (thanks Pietro!)
  2. Downgrade jQuery to pre-1.9.0 until JRA-31576 is resolved.

Updated to reference Pietro's documented workaround and reference JRA-31576 so you can vote for a non-workaround solution.

Hi Anson,

The problem is that you have updated JQuery and $.browser was [removed in ver 1.9|http://jquery.com/upgrade-guide/1.9/#jquery-browser-removed]. To solve this you have two options:

  • Use the following code:
navigator.appName == 'Microsoft Internet Explorer'

This will have the same effect as:

$.browser.msie

  • Use [Jquery Migrate|https://github.com/jquery/jquery-migrate/] that allows using removed functions and gives a notice about removed functions (in the console.log).

Cheers,

Hi Pietro,

when you plan to fix this bug and update collector?

Pietro has since documented this workaround and referenced JRA-31576, so you can vote and watch the issue.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Tuesday in Marketplace Apps

If you’re an Atlassian app developer, you’ll want to know about Atlas Camp!

This September 6-7, hundreds of Atlassian App developers will flock to Barcelona Spain to build skills, discover product roadmaps, meet face-to-face with the Atlassian team, and learn how to extend t...

118 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you