JS Resources not loaded in IE

Séb P.
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 16, 2012

Hi,

I'm developping plugins for Jira 5. I have the following description:

<web-resource key="autocomplete" name="Activities Autocompleter">
		<dependency>com.atlassian.auiplugin:ajs</dependency>
		<dependency>com.atlassian.auiplugin:jquery-ui-other</dependency>
		
        <resource type="download" name="activity-edit-ac.js" location="com/xxx/apps/jira/plugins/xxx/web/js/activity-edit-ac.js" />
		<resource type="download" name="activity-edit.css" location="com/xxx/apps/jira/plugins/xxx/web/css/activity-edit.css"><property key="content-type" value="text/css"/></resource>
		<resource type="download" name="auto_button.gif" location="com/xxx/apps/jira/plugins/xxx/web/img/auto_button.gif" />
		
		<context>jira.create.issue</context>
		<context>jira.view.issue</context>
	</web-resource>

It works perfectly fine with Firefox (3 & 10) and Chrome. But in IE (7 & 9) my resources are not loaded (I can't see my javascripts files in the head section)

What is going on? Anybody have seen this before??

Thanks!

3 answers

1 accepted

0 votes
Answer accepted
Séb P.
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 19, 2012

Ok, have found this one, seems closely related to my issue:

https://jira.atlassian.com/browse/JRA-28831

0 votes
Séb P.
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 16, 2012

Actually, I should have an error saying my call is not a function, and obviously that's right since it's not defined anywhere (neither in batch.js nor any other js resource) (not sure about the exact error message since my developper station has very restrictive security settings, and I can't activate scripting error popups, but using alert almost everywhere I'm sure my function get not called).

Your tip of setting a param batch to false did not help... Exact same behavior...

Why under FF and Chrome the include is made right, and not under ie? it's weird to have a different server behavior depending on the browser, for such a simple thing as adding a script tag in the head section...

Séb P.
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 16, 2012

Yes, under FF and Chrome I can see a node like that in the head section:

<script type="text/javascript" src="/jira/s/fr_CH-a1hkwu/713/3/1.0-SNAPSHOT/_/download/resources/com.xxx.apps.jira.plugins.xxx:autocomplete/activity-edit-ac.js" ></script>

And not with IE...

JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 16, 2012

> it's weird to have a different server behavior depending on the browser

I agree, it is weird. So the page source is actually different? You expect some minor differences like diff stylesheets, but not that.

0 votes
JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 16, 2012

I don't think they should appear in the <head> section, they should be added to batch.js. You can disable this by adding the element:

<param name="batch" value="false"/>

to your <resource> element. Or in dev you can set system prop jira.dev.mode: true.

What actual script error do you get in IE, if any?

Séb P.
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 16, 2012

have changed the context to atl.general, still the same problem...

Séb P.
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 19, 2012

changing the user-agent using Fiddler to something else than IE, my resources get loaded...

Suggest an answer

Log in or Sign up to answer