This was driving me crazy. I developed an add-on for Confluence, but sometimes the top navigation bar was missing items.

I was concerned that my add-on was really misbehaving and interfering in some way with the core product. There was no need to worry as Danielle figured it out.

On license expiry, rather than informing you that the license has expired, it simply disables features in the main header such as:

  • Spaces
  • People
  • Create button
  • The search box

If you run a product under the Atlassian SDK, you get a single day license. If you leave it overnight and come back, bits of the product (such as the Create button) get disabled. Restarting the product resets the license, so the disabled parts start working again. This doesn't seem to be documented anywhere as far as I can tell.

Here's a video demo:

This is really annoying as it can lead to wasted time, so here's some boilerplate JavaScript to add to all Confluence plugins:


AJS.toInit(function ($) {
setTimeout(function () {
// Development mode
if (AJS.params.isDevMode && $('#quick-search-query').length === 0) {
alert(
' ~~~ RESTART CONFLUENCE ~~~ \n' +
' ~~~ THE LICENSE HAS EXPIRED ~~~ \n' +
'~~~ Bits of the UI have disappeared ~~~'
);
}
}, 1000);
});

This code waits a second and then checks to see if the Confluence instance is in "dev mode", then looks for the search field. If the search field is missing, it assumes the license has expired and alerts you with an annoying popup/JavaScript alert.