Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Using batch=false on a js ressource stops its inclusion

Eugen Mayer
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.
June 18, 2013

I do have several JS ressources and css ressrouces getting included on the context page/admin. It works fine, until i do not activate batch=false for a javascript ressource. If i do so, that file does not get included. Setting it back to batch=true - file gets included again.

  1. I verified 100% its not included
  2. It cant be a context / path ( location) issue, since it does work with batch=true
  3. I have read https://developer.atlassian.com/display/DOCS/Web+Resource+Plugin+Module#WebResourcePluginModule-Non-BatchedMode - nothing special here

I kind of smell a SDK bug here, using 4.2.0 at the moment, stagin 4.3.7 of Confluence.

5 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
Joe Clark
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 14, 2013

This isn't an SDK bug - it has to do with changes in the core plugin framework within Confluence. We've had to make some big changes to the way batching works in Confluence recently in order to solve some challenging technical limitations.

The long and short of is that "non-batched mode" is not really an option anymore. There is so much JavaScript in Confluence and its plugins that not batching any of it would cause breakages in Internet Explorer due to IE's limitations on the number of external CSS and JS resources that may be served within a single page

It seems to be an oversight that disabling batching is still listed in the docs as a option. I'll be fixing that up today :-)

Out of interest - why do you need to disable batching? Is it just so you can debug your source more easily?

Ulrich Kuhnhardt [Comalatech]
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 14, 2013

We experience the opposite behaviour and run into problems with IE since Confluence 5.2 does not batch editor resources reliably.

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.
June 22, 2014

Hi @Joe- I know this is old, but still relevant imho.

IE is irrelevant here because we are just talking about for the purposes of debugging, and no one in their right mind would debug in IE.

If you're trying to debug it's possible in chrome to use batched mode, just about, but impossible in Intellij IDEA which has in many ways a better js debugger, as you can't map your sources to URLs.

But also, often you just want to disable batching just for a few files in your plugin, not disable entirely. I used to use the params-batch=false XML thing, which now in jira 6.2 prevents the inclusion of the resource completely.

You can disable batching entirely with jira.dev.mode but this just makes the whole thing very slow. I hope Atlassian revisit this...

1 vote
Eugen Mayer
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 22, 2013

"one large js file" - you take this point, like i did not say IE. Debug this kind with IE8 - thats absolutely horrible ;/

1 vote
Eugen Mayer
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 21, 2013

Well disabling batch mode is key to debug JS issues mainly, especially with IE. Hunting bugs in a JS aggregated file is seriously PITA with IE.

This "inconvenience" wasted more then 5 hours...until i gave up.

Ulrich Kuhnhardt [Comalatech]
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 22, 2013

When you start the host app in development mode your plugin's JS is served plain. It's placed in one of the large context batch JS files. You debug from there.

0 votes
Eugen Mayer
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 12, 2013

So well, i guess thats how it is? Could we at least have an answer by an attlassian developer?

0 votes
David Pinn
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.
July 9, 2013

I am smelling the same bug. I'm working with Confluence 4.3.7 and AMPS 4.2.3.

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events