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

JS and html not loaded for web-panel

bukshev May 12, 2020

Problem brief

I develop a simple plugin for our self-hosted Bitbucket Server. In this plugin I have a web-panel, which appeared on each Pull Request in bitbucket.web.repository.banner.

On dev-localhost environment by Atlassian all my changes works and shows correctly. But after packaging my plugin to jar and sending to our admins for installation, something strange happens: the plugin is successfully installed, merge-checks work correctly, logs from the java-code successfully come, but I don't see my web-panel (but on dev-env I always can see it).

 

Context

  1. For web-panel I use html+css+js.
  2. JS with CSS are located in HTML file in specific sections: JS in <script>, CSS in <style>.
  3. So I have only the one file for this web-panel, without additional resources.
  4. Bitbucket version: 7.0.1.
  5. On deploy my html-velocity-view not loaded into pull-request page, so I can't see anything in JavaScript console.

 

atlassian-plugin.xml

<atlassian-plugin key="${atlassian.plugin.key}" name="${project.name}" plugins-version="2">

...

<web-panel key="specific-key-for-web-panel" location="bitbucket.web.repository.banner">
<resource name="view" type="velocity" location="/html/file-name.html"/>
<condition class="path.ConditionFileName" />
</web-panel>

...

</atlassian-plugin> 

 

Questions

What could be the problem?

How can I catch the problem if I do not have direct access to the server? (I have access to atlassian-bitbucket.log file only)

 

UPD 1 (few plugins on the server)

  • We have few plugins on the server. Two of them embed content in the same place — bitbucket.web.repository.banner.
  • Keys in atlassian-plugin.xml are different.
  • Foreign plugin is disabled for our repository and our plugin is disabled for theirs.

 

UPD 2 (for the first time, everything was fine)

  • During the first installation, the panel was displayed as needed.
  • But after that the problems started.
  • Removing the old version of the plugin before installing the new version did not help.

1 answer

0 votes
Maciej Adamczak
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 13, 2020

Hey @bukshev what web-resource context do you use to load the JS/CSS assets?

With Bitbucket 7.0 we introduced a new context name on the pull request page:

bitbucket.page.pullRequest.detail

https://developer.atlassian.com/server/bitbucket/reference/web-resource-contexts/


Let me know if that helps.

Thanks,
Maciej

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events