Javascript not loaded!

Hello,

strange things happen nowadays. On my local jira server 8.2.5 javascript of web resource loads just fine.
When I deploy my plugin to DEV instance, nothing is loaded (no javascript file).
Can someone advice what to check?

My webresource def:

<web-resource key="configuration-scheme-resources" name="Configuration scheme Handle Web resources">
    <dependency>com.atlassian.auiplugin:ajs</dependency>  
    <dependency>com.atlassian.auiplugin:aui-toggle</dependency>  
    <dependency>com.atlassian.auiplugin:aui-select</dependency>  
    <dependency>com.atlassian.auiplugin:aui-select2</dependency>  
    <resource type="download" name="configuration-scheme.js" location="/js/configuration-scheme.js"/>
<!--    <context>configuration-scheme</context>-->
    <context>atl.general</context>
    <context>atl.admin</context>
  </web-resource>

Loading the resource:

<html>
<head>
    <title>Handle configuration scheme</title>
    <meta name="decorator" content="atl.admin">
</head>
<body>
    $webResourceManager.requireResource("com.erstegroup.jira.plugin.andisScraper:configuration-scheme-resources")
<br>

Need to point out I googled and tried to remove first slash js/… and couple of other things, but nothing helped…

Please try to remove

$webResourceManager.requireResource("com.erstegroup.jira.plugin.andisScraper:configuration-scheme-resources")

as i see you already load the javascipt on any page

<context>atl.general</context>

Ok tried both approaches. First I have removed $webResourceManager.requireResource(“com.erstegroup.jira.plugin.andisScraper:configuration-scheme-resources”) from velocity template.

Did not work.

Secondly I tried to remove
atl.general
atl.admin
tags from plugin configuration, sadly did not work either.

What next can I try? thanks!

Hello,

Any update on the status of this issue?
I’m having a similar issue and it would be nice to know the solution for this.
Thanks!

Hello everybody,

I would like point out the existence of the $webResourceManager.requireResourcesForContext() method.
Try to include your context name here like in this case:
$webResourceManager.requireResourcesForContext("configuration-scheme")
@Vaclav also please do not forget to comment in the line in your web resource.

Also I personally call the requireResourcesForContext() method inside the body tag, although I wouldn’t know if it makes a difference.

I hope this helps