youngmon/atlassian-qna huggingface dataset:
How to get url currently displayed on browser
Asked by Masocha Masocha:

The question was also asked here

[https://answers.atlassian.com/questions/104859/how-can-i-receive-current-url-from-a-plugin-in-confluence](/questions/104859/how-can-i-receive-current-url-from-a-plugin-in-confluence)


Answers:
author: Masocha Masocha
body: With Javasacript l can only problem is will this work when for example l want the content as PDF because l need to use the current displayed URL in a condition in a user macro


author: Matthew J. Horn
body: Where? In a user macro? In a macro or plugin? In JavaScript on the page?


author: RambanamP
body: you can get using javascript

```
var pathname = window.location.pathname;
```

check this

<http://stackoverflow.com/questions/406192/how-to-get-the-current-url-in-javascript>

comments: author: Masocha Masocha
body: With Javasacript l can only problem is will this work when for example l want the content as PDF because l need to use the current displayed URL in a condition in a user macro


author: Andrey Markelov
body: For JIRA sometimes (from Custom Field, Tabs, ect) you can use:

```
public static String getBaseUrl() {    HttpServletRequest req = JiraWebUtils.getHttpRequest();    return req.getScheme().concat("://").concat(req.getServerName()).concat(":").concat(Integer.toString(req.getServerPort())).concat(req.getContextPath()); }
```


Tags: confluence-administration
confluence upgrade 3.5.16 -> 4.3.7logininfo does not exist
Asked by Tracey Voss:

We are upgrading from 3.5.16 to 5.3. I am first upgrading 3.5.16 to 4.3.7 but when I startup and log in I get an error page with the error "logininfo does not exist. There are a lot of other SQL related errors in the log as well. DB is postgres 9.1.1, OS is ubuntu 12.0.4.

We've copied prod database across to new environment and data directory. I've installed 3.5.16 which was started successfully. I've then run the 4.3.7 upgrade and we now get the above errors.


Answers:
author: Rodrigo Girardi Adami
body: Hi Tracey,

From the description it seems that upgrade didn't succeeded because of some database error. Note also that Postgres 9.1 was not supported for confluence 4.3 as \[we can see here\|https://confluence.atlassian.com/display/CONF43/Supported+Platforms\], although I would say that this wasn't the real problem.

According to this [simplified upgrade guide](https://confluence.atlassian.com/display/DOC/Upgrading+from+Confluence+3.5+to+5.1+-+Simplified+Guide), you can go from 3.5.13 directly to 5.0.3 and then upgrade to the latest confluence version. I recommend to restore the old version of confluence database and retry the upgrade following the guide above.

Cheers,

Rodrigo


Tags: upgrade
How I can made the list at the left in CONFLUENCE reveal AT ONCE automatically ?
Asked by Vlad Matv:

hi! I would like that at an entrance (log on) to CONFLUENCE 5.1.4 the list at the left revealed AT ONCE automatically as on the attached picture. How to make it?

![](../../upfiles/Untitled-1.jpg)


Answers:
author: Bob Swift (personal)
body: Try using the documentation theme configured with navigation something like:

```
{pagetree:startDepth=2|searchBox=true}
```

comments: author: Vlad Matv
body: Thank You, Bob. From Russia with love)


Tags: confluence-administration
Update JAVA for Confluence
Asked by Joel Brass:

I am running Confluence 5.1.2 which said that it is running JAVA 1.7.0_15.

I have installed the latest version of JDK to c:/software/JAVA/jdk_1.7.0_45 and set JAVA_HOME to this path and restarted the server. Confluence is still showing 1.7.0_15.

How do I get Confluence to pick up the newest version of JAVA?


Answers:
author: Harry Chan
body: You need to change setenv.bat / setenv.sh

Follow: <https://confluence.atlassian.com/display/CONFKB/How+to+Use+System+JRE+Instead+of+the+Bundled+JRE>

comments: author: Joel Brass
body: I have added

SET "JRE_HOME=C:\\software\\Java\\jdk1.7.0_45\\jre"

to setenv.bat. The new JDK is not showing up in confluence. Confluence is running as tomcat service in Windows. Does this use the setenv.bat?


author: Pawan Upadhyay
body: Hi Brass,

Please change it via command line.

-Go to the confluence instalation directory and then run the below commond for tomcat 6:

tomcat6w//ES//\<confucneServiceName\>

-Now you will get one window and go to Java tab and browse thru jvm.dll like as:jdk1.7.0_45\\jre\\bin\\server\\jvm.dll

-Now java class path: browse through bootstrep.jar via confluence-std\\bin

Thanks,

Pawan


Tags: confluence-administration
Restrict Confluence pages by default
Asked by Karie Kelly:

There was an question on this about a year ago, but was wondering if anything changed.

We have several different types of users accessing our system, with some that have limited access, but across spaces. We don't want to have to duplicate content into their spaces just for them to access - but, we also don't want them typically having access to many of the pages in a space - just a subset.

It would help our security concerns if we could restrict all pages upon creation to a group (our employees) and users would actually have to remove the restriction or change it if they want others to view the information.

We have many employees creating many pages across 35 pages and setting security it often forgotten and difficult to maintain.

Has anyone come up with a way to do this yet?


Answers:
author: Matthew J. Horn
body: AFAIK, there's no way to set default page permissions when creating a page. That's not to say you can't hack a way around this limitation. You might be able to do it with a REST call on page creation or something.
Programmatically getting plugin information
Asked by Boris:

I have a piece of code that is used to build multiple plugins. Instead of hardcoding the plugin information, I'd like to access it from within the code.

How is that done?


Answers:
author: Bhushan Nagaraj
body: Hey Boris,

Take a look at <https://developer.atlassian.com/static/javadoc/plugins/2.7/reference/com/atlassian/plugin/PluginAccessor.html>

comments: author: Boris
body: I've seen that but I would need to know the exact plugin key in order to get information about the plugin which doesn't work for me.

The code should be unaware of the plugin key.


Tags: confluence-app
Deactivate the sidebar scrolling
Asked by Gustav Karavas:

How can i deactivate the scrolling of the sidebar. E.g. If I am at the top of the website, the sidebar style is top: 20px. If i scroll, the sidebar changes to 0px. How can i disable that and how can i set the sidebar to 50px fixed?  


Answers:
author: Davin Studer
body: In confluence admin -\> Look and Feel -\> Stylesheet you can set custom styles that are applied gl0bally. You can override the default behavior there.

comments: author: Gustav Karavas
body: Hi Davin,

thanks for the response, but it still don't work. I have already tried this with this code:

```
.ia-fixed-sidebar {   top: 50;}
```

In the element resource of Chrome browser I can see that the value top: is changing from 20px to 0px after I scroll down. I want that this value is set to 50px all the time.


Tags: confluence-administration
Confluence ON Demand payment
Asked by Naohiro Kumamoto:

AS we have registered for the Confluence Ondemand trial version.. the credit card details was given...

After the trial period is over will the money be automatically taken for purchasing or should we place a separate purchase order ?

Please explain


Answers:
author: Jobin Kuruvilla [Adaptavist]
body: Credit card will be automatically charged.
> When your evaluation expires we will automatically charge the credit card provided at sign up allowing customers to continue using Atlassian OnDemand without interruption.

<https://www.atlassian.com/licensing/purchase-licensing#evaluations-1>


Tags: cloud

confluence-cloud
How do I embed Jira Agile gadgets within a Confluence page?
Asked by Rob Wiskow:

We would like to be able to embed the Burndown charts and other reports from Jira Agile into a Confluence page. I can't find any instructions on how to do this. I'm expecting I'll have to register an "external gadget" within confluence, but that seems to be expecting a URL to an .xml file, whereas the URLs for the Agile "gadgets" are all .jspa.


Answers:
author: Jobin Kuruvilla [Adaptavist]
body: See <https://confluence.atlassian.com/display/DOC/Registering+External+Gadgets>
> **To find a gadget's URL in JIRA:**
>
> * Go to your dashboard by clicking the **Dashboards**link at the top left of the screen.
> * Click **Add Gadget** to see the list of gadgets in the directory.
> * Find the gadget you want, using one or more of the following tools:
>   * Use the scroll bar on the right to move up and down the list of gadgets.
>   * Select a category in the left-hand panel to display only gadgets in that category.
>   * Start typing a key word for your gadget in the **Search** textbox. The list of gadgets will change as you type, showing only gadgets that match your search term.
> * Right-click the **Gadget URL** link for that gadget and copy the gadget's URL into your clipboard.


Tags: confluence-administration
Template Field Names
Asked by Dave Stewart:

I am new to this product and apologize if this has been answered before, I have searched for an answer but may not be using the right terminology.

I have created a global template but when I view it in preview or use it "live" I see the field names next to each field. For example, if the field is $projectname, I see (projectname) next to the project name field on the document being created from the template. I would like to hide these names. Can someone please advise me?

Also any suggestions on the best way to get up to speed on designing global templates beyond what's in the user manual?

Thanks,

Dave


Answers:
author: Davin Studer
body: The parenthetical version of the field name is only there during the page creation wizard. You will not see them when the page is created. They are there as helper text so you know what should be put into the input box. What is the use case for you wanting to get rid of them?

comments: author: Davin Studer
body: If you truly need to get rid of them you could put this in the global or space stylesheet.

Global stylesheet location: confluence admin -\> look and feel -\> stylesheet

Space stylesheet location: space admin -\> stylesheet

.templateparameter {  
display: none;  
}


author: Dave Stewart
body: Thanks so much. It seems redundent to have them as I tend to put labels to the left of the field, that's why I was asking.


Tags: confluence-administration
I have a different issue altogether. Can anyone help please?
Asked by Rahul Savaikar:

Hello,

I have a different issue altogether.

If you can see the 3 images (Confluence_1, Confluence_2 and Jira_1) attached, you will see that the GreenHopper gadget gets added to the page, however, nothing is displayed. Whereas, the same gadget in Jira displays the results.

We do not use SSL as Jira-Confluence is used only internally and the GreenHopper gadgets are added to the "Gadget Specification URL" section in Confluence. The Trust relationship is also set correctly between the two applications.

Please suggest!

Regards,

Rahul Savaikar

**Confluence_1**:

![](../../upfiles/Confluence_1_1.jpg)

**Confluence_2**:

![](../../upfiles/Confluence_2.jpg)

**Jira_1**:

![](../../upfiles/Jira_1_1.jpg)


Answers:
author: Chung Park Chan
body: Can you toggle the **Use gzip compression** in JIRA and **Compress HTTP Responses**in Confluence and see if it helps?


Tags: confluence-administration
Online Help mapping with the application
Asked by Poorani Aravindan:

Hi,

Is there a step by step procedure on implementing online help. What are required mapping files and what needs to be done at the application side.

Thanks,

Poorani


Answers:
author: Matthew J. Horn
body: Is your question: You are developing a desktop/web/mobile application that should link to pages in Confluence based on the context of the link?

If that's the case, then there's no built-in mechanism to handle this, nor is there any step-by-step set of instructions. You basically add links in your app to pages on your Confluence implemenation.

However, there are strategies you can employ to make sure this works well. One such strategy, that I use, is to use the web server front-end as a "map" of help links to Confluence pages (currently we do this with URLrewrite, but there are other ways). I replace the links in the app with "GO URLs", and map those GO URLs to actual pages in Confluence. That way, if the page name changes, or if we upgrade to a newer version and the version number in the path changes, I can update the links in once place and not require the app to be rebuilt.

Here's an example.

Our SDK installer includes a readme file that links to a page with additional installation information:

<http://devcenter.verivo.com/display/doc/5.+Install+an+Akula+License>

In the release notes, the URL is something like this:

<http://devcenter.verivo.com/go/1.0/online_activation>

When the page name changes (if it changes), or if we add version 2.0 (and subsequently change the 1.0 URL to /display/1.0/5.+Install..., then I can add a new GO URL for the older content and update it without changing the SDK.

hth,

matt


Tags: confluence-administration
Image is missing, when import a word document to on demand JIRA?
Asked by srinivasan radhakrishnan:

Hi ,

I am trying the below scenario, one particular image is missing in whole imported pages in on demand JIRA.

Steps

1. I have imported the word document with different images
2. In this document i have used common image for Notes indication in a document
3. When i imported the document to on demand confluence all images are present good, but the common images for Notes indication is missing in all imported pages in on demand JIRA

How to solve this issue.

![](../../upfiles/Notes.PNG)  
I have used the attached image for indicating all notes in whole document, that common image is missing in imported page in on demand document

Pleae share your knoledge for resolving this issue.

Thanks in advance.


Answers:
author: David Maye
body: It might be because the image that is missing isn't embedded into the document like your other images but instead being called from the program that created the document local images library. This would explain why just this one image is missing after import. I would check the formatting of the document and see where the source is located for that specific image.


Tags: cloud

confluence-cloud
What is the point of Blueprint Variables?
Asked by Jason Pohl:

Confluence 5.1

What is the point of Blueprint Variables? I can't seem to reference them, and there is not much documentation.

Here is what I'm trying to do:  
1) Created a Blueprint and created a variable in the document properties called $featureLabel

2) Within this template, I have inserted a Page Properties Report macro

3) Within this macro, I would like to specify my variable, $featureLabel, as the Label parameter.

However, when I view the page, I get the error:

"The specified label $featureLabel does not exist."

I've tried representing the variable as {featureLabel} and @featureLabel@, but no joy.

I'm guessing that I am not referencing the variable in the correct manner, but how do I do this?

If I can not do such a simple substitution, then what is the point of these variables?


Answers:
author: Tadd Seiff
body: See the [intermediate Blueprint tutorial](https://developer.atlassian.com/confdev/confluence-plugin-guide/confluence-blueprints/write-an-intermediate-blueprint-plugin). Regarding your technique using the properties file, they use this properties file there and you can see that it only sets DOM-like elements to be used while the blueprint is being used and also some system-required values like the name of the plugin, etc. They can be referenced by your soy/html templates for the Blueprint wizard.

I don't *think*these are meant to persist after the page is created, I think they are static.

I wouldn't call what you are doing as "variables", I'd call that "setting properties" for the plugin. I think you would want to use regular Template variables for what you want. Since these would be legit Template variables, they would probably register with your page properties MACRO.

So in summary, the Blueprint is just a stepping stone for creating the page, it's not going to get you persistent page properties. Why are you using a Blueprint? If you only need these variables, I think a Template would be what you need, unless you have other creation tasks.

(tl;dr; begin) FWIW:

I have a different understand of what a "Blueprint Variable" is.

I'm using variables in Blueprints with this \<at:\> syntax business in the template:

```
&lt;table&gt;...&lt;tr&gt;&lt;th colspan="1"&gt;ReqID&lt;/th&gt;&lt;td colspan="1" &gt;&lt;at:var at:name="reqID" /&gt;&lt;/td&gt;&lt;/tr&gt;...&lt;/table&gt;
```

These are entered client side in the wizard and bound by element name, i.e.:

```
&lt;input id="reqID" class="text" type="text" name="reqID"&gt;
```

Then I'm grabbing these server side in JAVA in a ContextProvider instance, where I can do back-end stuff using those values and pre-fill some other fields before the page is finally approved by the user.

All of this is transient though in that once the page is created, this all goes "out of scope".

NOTE: One thing I haven't figured out is how to get these type of "variables" to populate corresponding TEMPLATE variables.


Tags: blueprint

variable
Best practice for migrating Confluence 3.4.8 to 5.X
Asked by Dirk Brutscher:

Hi,

I'm currently evaluating the process of migrating our productive instance of Confluence 3.4.8 to a current 5.X version.

Is there a kind of "best practice" for migrating our content to the new version of Confluence?

Whats about attachments and ContentProperties written to pages by used plugins?


Answers:
author: Dirk Brutscher
body: I figured out something like this...

1. Provide a clone of the production environment for migration issues (with the current data).  

2. Check licence to be able to upgrade.  

3. Upgrade 3.4.8 -\> 4.3.7.  

4. Identify unmigrated / masked content by enabling logging for "com.atlassian.confluence.content.render.xhtml.migration".  

5. Restart ./admin/unmigratedwikicontent.action (only available in Confluence 4.x) to see which macros have migration issues.  
   (c.f. [https://confluence.atlassian.com/x/N4s4Dw](https://confluence.atlassian.com/x/N4s4Dw)))  

6. Fix all problems by removing macros or upgrading. Error example: *com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'sql' is unknown.*   

7. Redo 5. until no errors will be logged.  
8. Upgrade to 5.x ...


author: Dirk Brutscher
body: I think this should contain the informations: <https://confluence.atlassian.com/display/CONF53/Upgrading+Confluence+Manually> which was linked here <https://confluence.atlassian.com/display/CONF53/Upgrading+Confluence>


author: RambanamP
body: have you gone through this doc?

<https://confluence.atlassian.com/display/DOC/Upgrading+Confluence>

check this also will help you

[https://answers.atlassian.com/questions/206061/best-upgrade-path-from-confluence-3-4-8-to-the-latest](/questions/206061/best-upgrade-path-from-confluence-3-4-8-to-the-latest)


author: Dirk Brutscher
body: Things found in the meantime...

<https://confluence.atlassian.com/x/lAaBG>

<https://confluence.atlassian.com/x/ZgeBG>


Tags: confluence-administration
How to make a nice confluence page
Asked by Fajar Suryawan:

Like this:

![Confluence front](http://s22.postimg.org/ebypw375t/conf_Front.jpg)

which I found in [Atlassian's front webpage](https://www.atlassian.com/) (accessed 2013-10-19, click the "Collaborate" text)

Especially the team member photos. I tried to reproduce it using

Section( Column() Column() Column() ), Section( Column() Column() Column() ), ...

and within each column I put the Profile Picture macro, the User Mention macro, and an italized text mentioning each one's role.

But the result is ugly. The texts are too spaced, the photos aren't aligned, etc.

Maybe we can see the source for the page pictured above, or anyone has an idea how to craft such a page?

Thanks!


Answers:
author: Matt
body: Fajar, you can recreate a page like this using [Page Layouts](https://blogs.atlassian.com/2013/08/introducing-page-layouts-2-0-one-page-unlimited-layouts/) -- there's no need to use the Section and Column macros. See this video for a quick demo:

<http://youtu.be/4Q8-6494g5g>

You can use a table to keep the profile pictures and names aligned -- i.e. one profile pic per table cell (centered).


author: HosseinA
body: how about if you press the edit on that page to find out how it is done? :)


author: HosseinA
body: Hi. try using layouts.
Upgrade Path from Confluence 2.10 to 5.2
Asked by stephen torra:

Hello,

What is the correct upgrade path from **Confluence 2.10.2 to 5.2.5?**

Is it ***2.10.2 \> 3.5.13 \> 5.2.5?***

Thanks

-Steve


Answers:
author: Andrei [errno]
body: i'd say you should not skip major versions... I'd fit **4.x** in the chain

comments: author: stephen torra
body: Thanks Andrei!


Tags: confluence-administration
Confluence on demand
Asked by SeaninPDX:

Is it possible to change the sidebar within a Confluence OnDemand space? I want my sidebar to display "Space Shortcuts" and "Blog Posts", etc.

I can't seem to make this happen. Thanks for looking!


Answers:
author: BillA
body: You're probably using the documentation theme and need to switch to the default theme for that space. See documentation on how to do that at <https://confluence.atlassian.com/display/DOC/Applying+a+Theme+to+a+Space>


author: AgentSmith
body: Not sure exactly what you are looking for, but the details that follow should get you on the right path:

<https://confluence.atlassian.com/display/AOD/Configuring+a+Sidebar>


Tags: cloud

confluence-cloud

side-bar
Login with either userPrincipalName or sAMAccountName?
Asked by Sascha Backes:

Hi guys,

this question has been asked already some time ago (<https://answers.atlassian.com/questions/5639/ldap-login-with-username-either-userprincipalname-or-samaccountname>), but the given solution does not seem to work properly, because it will double the amount of Confluence users for us.

So, let me raise this question again: is there any way, for Confluence 5.1, to have users login with either the userPrincipalName ([user.name@domain.tld](mailto:user.name@domain.tld)) or the sAMAccountname (user.name)?

Thanks in advance!


Answers:
author: Davin Studer
body: I don't think so ... not without writing your own auth plugin.


author: Bastian Kippelt
body: Do you have any solution for this problem?


author: marco.scholl
body: that very bad. because samaccountname is obsolete and only used for pre-windows 2000

comments: author: Davin Studer
body: sAMAccountName is not obsolete. It is still supported and to my knowledge is going to be supportted for the forseeable future.


author: marco.scholl
body: the sAMAccountName is only for compatiblity in an active directory for pre windows and old login style DOMAIN\\USERNAME. the samaaccount has some limits (e.g 20 chars). we want have one login for all and not here you must use the old login name and here use the UPN.

but i have found that conflunce support UPN! so my problem is solved :D


author: Davin Studer
body: It was the means of auth pre-Windows 2000, but it has not been deprecated or rendered obsolete. It is still fully supported and will continue to be supported. They have since added more functionality with UPN, but sAMAccountNam is not going t be removed and is still a valid auth method for all current versions of Windows.

Yes, you certainly can use UPN for Confluence. It's just a matter of saying which filed you want to use in the user directory setup. I think the original question though was wondering about use both for login purposes not either or.


Tags: confluence-administration