youngmon/atlassian-qna huggingface dataset:
How to read external resources in Velocity
Asked by Adolfo Casari:

I would like to read {key:value} pairs in Velocity templates (for user macros). These values are placed in an external resource file.

Is this possible?

Thank you,


Answers:
author: Andy Brook [Plugin People]
body: Access to physical files would be a security risk and can't be done directly, Two options:

a) you could do this using a different approach, though a Beanshell (part of bobs [Scripting](https://bobswift.atlassian.net/wiki/display/SCRP/Confluence+Script+Plugin)plugin) that could load resources and generate markup. Some scripting/Dev skills required.

b) IIRC you can write a plugin that contributes the necessary resources as part of a plugin, with a Java accessor object written to read the data, that object could then be made available in the velocity context. Dev skills required.

comments: author: Adolfo Casari
body: I think b) is the way to go, is there any URL that document this approach?

Thank you.


author: Andy Brook [Plugin People]
body: You'll need to create a plugin with a Velocity Context Module, that bundles the 'helper' you access from Velocity, along with the resources that may be packaged within the plugin or on your local OS if thats what you wanted to do.

- <https://developer.atlassian.com/display/CONFDEV/Velocity+Context+Module>
How to tell if running 32 or 64 bit Confluence
Asked by Chris Kast:

I've inherited the managment of our Confluence instance and I need to upgrade it to the latest. How can I tell if we're running the 32 or 64-bit version? If I do a 'file' command on /opt/atlassian/confluence/jre/bin/java it says it's a 32-bit process. So can I assume I need the 32-bit updater? Thanks!


Answers:
author: Chris Kast
body: Thanks, all. Looks like it's 32-bit.


author: Sam Hall
body: 1. Browse \| Confluence Admin
2. Administration \| System Information
3. Check the Java VM attribute under Java Runtime Environment

Note: 32bit performs better even on 64bit archetechture unless you've configured the JVM with \> 2GB heap space (and your wiki actually has enough load to justify the additional RAM allocation).

comments: author: Sam Hall
body: I should have mentioned the Java VM attribute will state 64 if it's 64bit (if it doesn't metion 64 then it's 32 bit).


author: Kevin Mote
body: Note: For JIRA administration, the Java VM attribute is under the "Server Info" section on the System Info page.


author: Jobin Kuruvilla [Adaptavist]
body: If your machine is 64 bit, you should be safe to use a 64bit upgrader. It removes the old installation files and creates new ones. The only thing it reuses is the actual data and some configurations (like memory parameters).

Test it first!
How to add tabs in a confluence page?
Asked by Avinash:

Hi,

I want to add different tabs inside a confluence page with custom tab names and colors. I tried using the composition set up macro with deck and card macro like the following sample code

{composition-setup}

{deck:id=myDeck}

{card:label=tab1}

This is the first tab's content

{card}

{card:label=tab2}

This is the second tab's content

{card}

{deck}

{composition-setup}

But, Nothing gets displayed on the page. Somebody help!

Thanks


Answers:
author: Bob Swift (personal)
body: Just use the composition setup at the top, not surrounding the main body.

comments: author: Avinash
body: Oh, just got it working! for some reason didnt show up in preview. Thanks a lot!


author: Avinash
body: You mean have the composition setup macro at the top and not at the bottom? I tried that too...still nothing! Am i missing something?


author: Jeannene Schelski
body: What version of confluence is this in. I am trying to make the tabs across the page but dont see how I can go into the source code platform to update the code only see the view mode and edit mode to update the pages I have . Can you assist.


author: CharlesH
body: Are you using Confluence 4? In this case the composition-setup macro is not required for deck/cards. Just use those macros directly.

comments: author: Avinash
body: No, Im using Confluence 3.5


author: Avinash
body: I came across navitab macro. It automatically pulls in all the pages assocated with a root page and assigns them as labels. Also clicking the tab opens up the page associated with it. It doesnt give you a snapshot of the content. So basically this macro doesnt serve the purpose but it might be useful if you want the page links to be presented in a cool way!


Tags: macro

tab
Where is the SalesForce plugin for Confluence?
Asked by Robert Pepitone:

I'm demo-ing Jira and Confluence (on deamnd) and I want to download the SalesForce plugin for Confluence but I don't see it listed under User Installed Plug-ins or System plugins. Where can I find it?


Answers:
author: CharlesH
body: The SalesForce plugin is made by CustomWare and is described here: <http://wiki.customware.net/repository/display/AtlassianPlugins/Salesforce.com+Confluence+Plugin>However, it may not be allowed for use with Confluence OnDemand. See policy details here: <https://confluence.atlassian.com/display/AOD/Atlassian+OnDemand+Plugin+Policy>

comments: author: Robert Pepitone
body: The SalesForce plugin for Confluennce is listed under 'Direct Purchase Commerical PLugins'. I've gone to the Customware website and downloaded the SalesForce Connector but I'm not sure how that is applied to my on-demand Confluence instance.


Tags: confluence-cloud
How can I get the Browse->Space Directory output to include the Space Administrator?
Asked by Sami Moran:

I'd like my Space Directory listing to include the same information as your documentation site does. See <https://confluence.atlassian.com/spacedirectory/view.action> .

To access this view on your documentation site, click **Browse** -\>**Space Directory**.

We're currently running Confluence 4.04.

Thanks!


Answers:
author: Amalia
body: You need to change the Space Directory bundled plugin in order to do that. Go to *\<confluence-install\>/confluence/WEB-INF/classes/com/atlassian/confluence/setup* and open "atlassian-bundled-plugins.zip" file. Locate "confluence-space-directory-4.x.jar" and open it using an archiving utility. In *templates* folder, there are two files that you need to edit.

**space-directory.vm**

This template displays what is shown in the Space Directory. Locate the code below at line 55:

```
&lt;span class="column-heading desc-heading"&gt;$i18n.getText("description.name")&lt;/span&gt;
```

and add the following code below it:

```
&lt;span class="column-heading admins-heading"&gt;Space Administrators&lt;/span&gt;
```

**space-item.vm**

Locate the code below at line 11-13:

```
&lt;div class="entity-attribute space-desc"&gt;        &lt;span&gt;$generalUtil.htmlEncode($desc)&lt;/span&gt;    &lt;/div&gt;
```

and add the following code below it:

```
&lt;div class="entity-attribute space-admin"&gt;        &lt;span&gt;		#set ($permissions = $space.getPermissions())				#foreach ($permission in $permissions)			#if ($permission.getType() == "SETSPACEPERMISSIONS" &amp;&amp; $permission.getUserName())			&lt;a href="/display/~$permission.getUserName()" class="url fn confluence-userlink userlink-0" data-username="$permission.getUserName()" title="" data-user-hover-bound="true"&gt;$userAccessor.getUserIfAvailable($permission.getUserName()).getFullName()&lt;/a&gt;			#end		#end				&lt;/span&gt;    &lt;/div&gt;
```

You'll find the links below useful:

* <https://confluence.atlassian.com/display/CONFKB/Editing+Files+within+JAR+Archives>
* <https://developer.atlassian.com/display/CONFDEV/Confluence+Objects+Accessible+From+Velocity>


author: Sami Moran
body: Thank you for the info! Very helpful!
How to unhide email address in profile
Asked by Rose Rose:

We are using confluence 4.2 and all the email addresses are hidden. Is there a way to turn on the "unhide" feature for email addresses? ![](../../upfiles/confluence_unhide.jpg)


Answers:
author: Jobin Kuruvilla [Adaptavist]
body: Change the User email visibility to "public" under Administration \> Users \& Security \> Security Configuration

comments: author: Rose Rose
body: THANK YOU!!!


Tags: email

profile
Is there a way to import or share confluence pages from different confluence sites?
Asked by Rose Rose:

I'm trying to develop some help pages and tutorials for my confluence users and I would like to be able to utilize some of the already created pages in the Confluence 101 site. Is there a way for me to embed some of the pages from <https://confluence.atlassian.com/display/CONF42/Confluence+Wiki+Markupto> my wiki? I've been added URL's but is there a way to put the content of those pages in my pages?


Answers:
author: Thomas Schlegel
body: Hi,

Have a look at the iframe macro. With this you can show another web page in an embedded window on your confluence page.

Cheers

Thomas

comments: author: Rose Rose
body: Thank you!!


author: SarahA
body: Another way is to use a Confluence Page gadget:

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


author: Bob Swift (personal)
body: [CLI Plugin for Confluence](https://bobswift.atlassian.net/wiki/display/CCLI) has an [include-remote](https://bobswift.atlassian.net/browse/CCLI-2) macro for including pages from other Confluence systems. There are some limitations, but see if that works for you.


Tags: embed

page
API search sorting
Asked by Liam Jones:

I need to pull a combined list of the 'X' latest pages and comments for a specific space sorted by creation date (for display within another intranet application).

The space and content type restriction is no problem but I'm having trouble with the descending sort by creation date.

Is this possible via the search API? I've looked through the documentation and haven't found a way to do this yet (although it's possible via the regular Confluence search UI).

At the moment it's looking like I'm going to have to resort to a raw SQL query against the Confluence DB but I'd like to avoid that if possible.


Answers:
author: Remo Siegwart
body: You could use the undocumented AJAX API of the Recently Updated macro to get the list of recently updated pages and comments of a specific space. Here's what the URL could look like:

```
http://path.to.your.confluence/plugins/recently-updated/changes.action?theme=concise&amp;pageSize=15&amp;spaceKeys=test&amp;contentType=page,comment
```

You would probably need to add HTTP basic authentication to get the content from outside of Confluence.

Hope this helps

comments: author: Liam Jones
body: Thanks Remo, think I'll go with this one for now. It's not perfect but it does give me a relatively clean/barebones HTML response. :)


author: CharlesH
body: As an alternative approach you could have a wiki page with the recently-updated or reporting macros to do the 'search' in the way you need. You could then call the renderContent method (SOAP API) for this page to get the data back that you need. Perhaps neater than the Sql option, as this way is guaranteed to get back the same results as the user would see if they were using Confluence I.e. Permissions respected.

comments: author: Liam Jones
body: Thanks for the suggestion Charles. I'd forgotten you could ask for a rendered copy of a page's content. Might be a bit messy to extract what I need from the HTML but good point on the permissions.

I'm guessing it's not actually possible to sort via the search API then? :/


author: Liam Jones
body: Outside of Confluence, it's for use by a WCM system on our network.


author: Remo Siegwart
body: Do you need to get the list from outside of Confluence or in a plugin?
Upgrading Confluence 3.5.17 from a standalone Zip file in windows7
Asked by divya chennuru:

I have downloaded confluence 3.5.17 standalone zipfile and extracted in C drive. I have taken the data path from confluence 3.4.9 and pasted it in confluence.init.properties. And i have started the server,the server gets started but the application is not able access,what i have do?can any one reply me


Answers:
author: divya chennuru
body: It is resolved


author: Jobin Kuruvilla [Adaptavist]
body: Simple. Follow the documentation.

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

comments: author: divya chennuru
body: Thank you Jobin
Code macro Title font size
Asked by George Vanecek:

To change the code body font size, I have

1. div.codeContent.panelContent {
2. font-size: 12px;
3. }

in the PDF Stylesheet which works great, but this does not affect code **title**. What is the CSS div tag for also changing the code title in the PDF export? The default is way too large, seems to be around 28.

Thanks


Answers:
author: George Vanecek
body: Found the answer from reverse engineering the HTML generating the page. The answer is to add div.codeHeader.panelHeader.

```
* This should fix the bug in the code plugin rendering too large a font. */div.codeContent.panelContent {  font-size: 12px; }div.codeHeader.panelHeader {  font-size: 14px;  font-weight: bold;}
```


Tags: code

css

pdf
How do I allow a subset of users to only see some pages of a space?
Asked by Systems Department:

We have a group of users (Call them GuestUsers) that we only want to be able to see a few specific pages in a Confluence space. We would also like these pages to be able to live in their natural locations in the heirarchy so when full access users view the space it appears logical and normal.

I thought that I could perhaps allow the group GuestUsers in the space permissions and then add a page restriction to the space root page granting only access to Normal Users. Then for each page that I want to be public I would add a read permission for (GuestUsers). This did not seem to work though as the GuestUsers cannot view the root page so they see nothing.

Does anyone know how I can give a group read access to a subset of pages that may be nested amongst pages that they are not supposed to see?

Thank you


Answers:
author: RianA
body: Hi,

Perhaps this documentation would help:  
\* <https://confluence.atlassian.com/display/CONF34/Page+Restrictions#PageRestrictions-HowtoOpenPartofaSpace>

Cheers,  
Josua

comments: author: Systems Department
body: The approach outlined in that document does not quite do what I was hoping. Basically with that approach you have to place all of the pages that you want GuestUsers to access at the root of the space. What I am hoping for is GuestUsers to be able to access some pages that are nested amongst pages they cannot access.


author: Thomas Schlegel
body: You can only restrict pages, not open it to someone, who is not allowed to see the parent page. One of the problems is the page hierarchy. How should a page be displayed, if the parent pages should not be seen ? Should it flow somewhere in the page tree ?

We had the same problem as you and solved it like it is described in the document Rian mentioned. This works quite well but of course you are not as free in designing the space tree as you might want to be.


Tags: permission
As Confluence admin, is there a way to view restricted pages?
Asked by Susan Hazlett:

An employee recently left the company and I know there are pages that he restricted the viewing of. Is there a way -as an administrator- to see the restricted pages? I'd like to reassign the restricted list to someone else.


Answers:
author: Jobin Kuruvilla [Adaptavist]
body: A space admin can view restricted pages and remove the restrictions.

<https://confluence.atlassian.com/display/DOC/Viewing+Restricted+Pages>

comments: author: Susan Hazlett
body: Thanks! That's exactly what I was looking for! Not sure why I missed it looking through space admin - thanks for the doc pointer!


Tags: cloud
Why do disabled people show in the people directory?
Asked by Daniel Zajic:

Seems like they should not show up, since in most cases they can't be removed. When people leave a company it'd be nice to be able to at least not have them show up when a user browses the "people" directory.


Answers:
author: Michael Knight
body: This is a bug in Confluence: <https://jira.atlassian.com/browse/CONF-16477>

I'd encourage you to vote/watch/comment on the issue as you see fit. The more attention the issue receives, the more likely it will be given priority on the backlog.


Tags: cloud

confluence-cloud
How to use a HTML macro along with wiki markup?
Asked by Avinash:

Hi,

I try to use the {html} macro for inserting some html code in my confluence page. But, it says unknown macro when i preview it. Is this possible or am i missing something?

Thanks


Answers:
author: Amalia
body: Make sure that the HTML plugin and modules related to it are enabled

<https://confluence.atlassian.com/display/DOC/Enabling+HTML+macros>


Tags: html

macro
Mode object type and possible values
Asked by Matthew J. Horn:

In typical decorators, you see something like this:

#set ($mode = $params.get("mode"))

Can anyone tell me what type $mode is and what the possible values are? I've seen "edit" and "view", but is there a list of constants somewhere? Thanks!


Answers:
author: CharlesH
body: Try the documentation for the show-if macro by Customware as it offers a mode parameter as a criteria for showing content. One other mode is "template" for when a template is being previewed.


Tags: show-if

view
Removing tool tip
Asked by Avinash:

Hi,

I am using the tab menu for my home page and when i link the tabs to other confluence pages i get the tool tip displaying the name of the tab. I dont want the tool tip. Its kinda redundant and looks odd. how do i eliminate the tool tip as there is no option under the edit link browser?

Thanks


Answers:
author: Matthew J. Horn
body: There are some ways to do this with jQuery, described here:

<http://stackoverflow.com/questions/1027762/how-to-disable-tooltip-in-the-browser-with-jquery>


Tags: link

tool-tip
Upgrade from 500 to 2000 Users
Asked by Arantxa Lacasa Madero:

Hello!!

First of all, I know that our Confluence version is not supported anymore, but we have already upgraded it in a sandbox and the customer is testing it right now.

Said that, we need some support assistance if possible.

Confluence license is for 500 users. Customer has asked us to upgrade it to 2000 users, and we have some HW and SW capability doubts.

We have both jira (unlimited users) and Confluence (500 users) installed in the same server. Only those applications are in that server.

Both use the same tomcat instance.

Confluence application has 7GB, and Jira application has 18GB.

Server has 4GB of RAM for both applications.

In database, Confluence has 500MB.

Questions, when upgrading Confluence to 2000 users:

1. Should we separate Jira and Confluence tomcat instances so they can be configured separately?

2. If so, how should we configure Virtual Machine or other configurations?

3. Will it be enough with 4GB of RAM for both applications?

4. How will the space in server application increase, more or less? To know if there will be enough space.

5. How will the space in database increase, more or less?

Thanks for your help.


Answers:
author: Nic Brough -Adaptavist-
body: \>Both use the same tomcat instance.

That's not supported, or even recommended - you really should split them out into two Tomcats. Which kind of answers question 1 ;-)

For q2, it's a bit of a vague question. I'd just run through the installation guides for both applications, and simply make sure they're running on different ports. Beyond that, the rest of the answer is "depends on your config"

For q3, again, it's more up to you. As a very rough guide, they like more memory, but it depends on your usage and load. It's a little difficult because you sort of contradict your own statements - what matters is how much the apps are allowed to use (you said 7 and 18Gb, then say 4?)

q4. Negligble. You'll have two Tomcats instead of one, but that's tiny compared with your data and logging, which will remain roughly the same size. That pretty much goes for 5 as well - you'll actually struggle to see any difference in the combined sizes in the database.
Migration to wiki markup not working properly for composition macro, amongst others
Asked by JamieA:

Hi...

I am trying to do the long put-off upgrade to confluence 4.2.8 from 3.4.9. One problem I have is that some macros are not being migrated to xhtml, even after the latest plugin is in place, and I have rerun the wiki markup conversion.

For instance, I have in my source:

```
<ac:macro ac:name="unmigrated-inline-wiki-markup">  <ac:parameter ac:name="atlassian-macro-output-type">BLOCK</ac:parameter>  <ac:plain-text-body><![CDATA[{composition-setup}{composition-setup}]]></ac:plain-text-body></ac:macro>
```

whereas if I create a new page and add it I get:

```
<ac:macro ac:name="composition-setup">  <ac:plain-text-body><![CDATA[ ]]></ac:plain-text-body></ac:macro>
```

I don't really care per se, but the cloak and deck macros are not working in the pages that have been migrated.

Like I say, I have rerun the task to migrate content but it makes no difference to this page. How can I change it in the db so that it thinks this page is available to be re-migrated? How can I try to convert a single page so I can up the debug and not worry about the other 1500 broken pages?

(I'm not going to rant about the new editor, I'm not going to rant about the new editor....)


Answers:
author: Brendan Patterson
body: This is related and was very helpful for my upgrade:

<http://wiki.customware.net/repository/display/AtlassianPlugins/Upgrading+from+Conf+3.x+to+4.x+-+CustomWare+Plugins>


author: CharlesH
body: You can find and edit this page even though it contains unmigrated content, right? In which case, is the composition setup macro needed any more? The Composition plugin has been updated for Confluence 4, and the documentation suggests this macro is no longer mandatory as it once was.<http://wiki.customware.net/repository/display/AtlassianPlugins/composition-setup>


Tags: addon-net.customware.confluence.plugin.composition

markup

server

servicerocket

upgrade
Application permission denied when trying to create Confluence user with XML-RPC
Asked by Anders Nordb?:

I'm trying to create Confluence users for my OnDemand Confluence using XML-RPC and java. I'm able to login and to retrieve information about users, spaces and projects, but when trying to run the following code:

```
Map newUser = new HashMap();            newUser.put("email", email);            newUser.put("fullname", fullname);            newUser.put("name", name);            newUser.put("url", CONFLUENCE_URI + "/display/~" + name);                        client.execute("confluence2.addUser", new Object[]{token, newUser, password});
```

I get the following error: "Could not create new user 'testuser': com.atlassian.crowd.exception.ApplicationPermissionException:"

Is this not possible with Confluence OnDemand?


Answers:
author: LucasA
body: Hi,

Please make sure that you have (the user that you are using on XML-RPC) the necessary permissions to create users on your instance. Note that the users permissions are the same for API requests and UI.

Cheers!

comments: author: Stephen Landry
body: Hmmm


Tags: cloud

confluence-cloud
Selecting font via the Wiki toolbar
Asked by Rodney Hughes:

Is it possible to change the font from the Wiki toolbar?

I use one instance of download Confluence and one of On Demand


Answers:
author: JohnA
body: Hi Rodney,

It isn't possible to select fonts from the toolbar in Confluence, although I have created a new feature request for you to ask that this functionality is added to a future version of Confluence. You can watch/vote/comment on the feature request here: <https://jira.atlassian.com/browse/CONF-26129>

In the meantime it is possible to change the fonts used in Confluence by following the instructions on this page to create a CSS stylesheet for your downloaded Confluence instance, however please be aware that this solution isn't permitted for your OnDemand instance: <https://confluence.atlassian.com/display/DOC/Styling+Fonts+in+Confluence>

All the best,  
John