-
Type:
Bug
-
Resolution: Answered
-
Priority:
Low
-
None
-
Affects Version/s: 5.2.11
-
Component/s: None
-
5.02
I'm developing a gadget with atlassian development kit with a local jira instance, (v5.1.8#787-sha1:823790c).
I include several javascript libraries, which I have defined in my atlassian-plugin.xml:
<web-resource key="resources">
<dependency>com.atlassian.auiplugin:ajs</dependency>
<dependency>com.atlassian.auiplugin:aui-experimental-restfultable</dependency>
<resource type="download" name="kbgrid.css" location="css/grid.css"/>
<resource type="download" name="jquery.minicolors.css" location="css/jquery.minicolors.css"/>
<resource type="download" name="jquery.uix.multiselect.css" location="css/jquery.uix.multiselect.css"/>
<resource type="download" name="jquery-ui.min.css" location="css/jquery-ui.min.css"/>
<resource type="download" name="underscore.js" location="js/underscore-min.js"/>
<resource type="download" name="backbone.js" location="js/backbone-min.js"/>
<resource type="download" name="jquery.sortElements.js" location="js/jquery.sortElements.js"/>
<resource type="download" name="jquery.tablesorter.js" location="js/jquery.tablesorter.js"/>
<resource type="download" name="jquery.serializeObject.js" location="/js/jquery.serializeObject.js"/>
<resource type="download" name="json2.js" location="/js/json2.js"/>
<resource type="download" name="jquery.minicolors.js" location="/js/jquery.minicolors.js"/>
<resource type="download" name="jquery-ui.min.js" location="/js/jquery-ui.min.js"/>
<resource type="download" name="jquery.uix.multiselect.min.js" location="/js/jquery.uix.multiselect.min.js"/>
<resource type="download" name="config.js" location="/js/config.js"/>
<!-- jquery Datatable resources -->
<resource type="download" name="datatable/images/back_disabled.png" location="/datatable/images/back_disabled.png"/>
<resource type="download" name="datatable/images/back_enabled_hover.png" location="/datatable/images/back_enabled_hover.png"/>
<resource type="download" name="datatable/images/back_enabled.png" location="/datatable/images/back_enabled.png"/>
<resource type="download" name="datatable/images/forward_disabled.png" location="/datatable/images/forward_disabled.png"/>
<resource type="download" name="datatable/images/forward_enabled_hover.png" location="/datatable/images/forward_enabled_hover.png"/>
<resource type="download" name="datatable/images/forward_enabled.png" location="/datatable/images/forward_enabled.png"/>
<resource type="download" name="datatable/images/sort_asc_disabled.png" location="/datatable/images/sort_asc_disabled.png"/>
<resource type="download" name="datatable/images/sort_asc.png" location="/datatable/images/sort_asc.png"/>
<resource type="download" name="datatable/images/sort_both.png" location="/datatable/images/sort_both.png"/>
<resource type="download" name="datatable/images/sort_desc_disabled.png" location="/datatable/images/sort_desc_disabled.png"/>
<resource type="download" name="datatable/images/sort_desc.png" location="/datatable/images/sort_desc.png"/>
<resource type="download" name="datatable/css/jquery.dataTables.css" location="/datatable/css/jquery.dataTables.css"/>
<resource type="download" name="datatable/css/jquery.dataTables_themeroller.css" location="/datatable/css/jquery.dataTables_themeroller.css"/>
<resource type="download" name="datatable/js/jquery.dataTables.min.js" location="/datatable/js/jquery.dataTables.min.js"/>
<resource type="download" name="gadget-style.css" location="css/gadget-style.css"/>
<!--<resource type="download" name="jquery.uix.multiselect_de.js" location="/js/jquery.uix.multiselect_de.js"/>
<resource type="download" name="jquery.uix.multiselect_en.js" location="/js/jquery.uix.multiselect_en.js"/>
<resource type="download" name="jquery.uix.multiselect_es.js" location="/js/jquery.uix.multiselect_es.js"/>
<resource type="download" name="jquery.uix.multiselect_fr.js" location="/js/jquery.uix.multiselect_fr.js"/>
<resource type="download" name="jquery.uix.multiselect_it.js" location="/js/jquery.uix.multiselect_it.js"/>
<resource type="download" name="jquery.uix.multiselect_nl.js" location="/js/jquery.uix.multiselect_nl.js"/>
<resource type="download" name="jquery.uix.multiselect_pt.js" location="/js/jquery.uix.multiselect_pt.js"/>
<resource type="download" name="jquery.uix.multiselect_ru.js" location="/js/jquery.uix.multiselect_ru.js"/>
<resource type="download" name="jquery.uix.multiselect_sv.js" location="/js/jquery.uix.multiselect_sv.js"/> -->
</web-resource>
My gadget makes two AJAX REST calls: One that requests html template for the view, and one that requests data to display in a table.
In my local running jira, my gadget is running fine, but when I deploy it to our production jira, after the second ajax call, the one who requests data for a table, I get the following javascript error messages:
In Chrome: "Uncaught TypeError: Cannot read property 'length' of undefined" in file "com.atlassian.auiplugin:jquery-lib.js:2"
In Firefox: "TypeError: a is undefined
..."resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b..." also in file "com.atlassian.auiplugin:jquery-lib.js:2"
I used a File diff tool and found only one big difference: In the production gadget.xml, my js-resources were packed into one file, called "[...]/download/batch/mygadget:resources/mygadget:resources.js"
But in my local jira the resources were loaded separately.
Can this be the reason for the exception?
Thanks in advance