youngmon/atlassian-qna huggingface dataset:
Set default Pagetree depth in Documentation Theme
Asked by Andrew Townsend:

Hi,

I'm wondering if there is an easy way to set the pagetree depth to 1 in the documentation theme? The pagetree that appears in the left-side navbar..

I had a look at the theme options but couldnt see anything..


Answers:
author: David Dube
body: Are you wanting to limit the maximum depth or you just want to see the first level of children... allowing people to expand a particular entry?

If the latter, try unselecting "pagetree" in the theme configuration... then in the navigation add whatever code you want to customize the page tree (root, startdepth, etc) in the Navigation section.

Example:

{pagetree:startDepth=1}

You can also use the [Show Expand Links, Show Collapse Links, or expandCollapseAll](http://confluence.atlassian.com/display/CONF33/Pagetree+Macro) to roll up a brand or unravel a tree all at once.

Does that help?

comments: author: bradley.nold@gmail.com
body: Is there also a way to limit the maximum page depth?


Tags: documentation

theme
How to force users to use strong password?
Asked by Ganymede:

How admin can set required policy for users to use only passwords with letters AND numbers etc?


Answers:
author: Matt
body: Try the User Security Management Plugin by Adaptavist:

<https://plugins.atlassian.com/plugin/details/4926>

Among other features, it offers:

**Better Password Control**

1. A raft of password strength/complexity options
2. Password expiry (so you can make sure your users change their password every x days)
3. Password history lists (so you can make sure your user's don't change to a password they've used in the last x)
4. Password minimum change (so you can enforce a password change only once a day)

comments: author: Calogero Bonasia
body: the url saysAw, shoot. We can't find the page.


author: Rajendra Dhawale
body: ya link is not working.


Tags: password
alphabetical sorting with accented characters?
Asked by Alan DeNiro:

Using 2.10--I'm setting up a Spanish-language table with the table-plus macro. I'm trying to do an alphabetical sort but the words that begin with an accented character end up getting sorted at the bottom of the list. For example, in a table of words beginning with "a", ?cido asc?rbico appears at the bottom of the a's. Is there a potential fix for this, in which the accented character can still appear but it will act like a regular "a"? Thanks,


Answers:
author: Bob Swift (personal)
body: This is a known issue - [TBL-117](https://studio.plugins.atlassian.com/browse/TBL-117)


Tags: table-plus
I have imported a space from Confluence 2.2.2 to Confluence 3.5.2, the import process has gone fine, but when I click on the space link it gives me page not found error!
Asked by Amey Nevrenkar:

I want to delete this space but unable to do so.


Answers:
author: Jeremy Largman
body: Try this:

1. Go to another space and browse to space admin
2. Click Remove Space. It'll bring you to a confirmation screen.
3. Check the URL.
4. Substitute your space key into that URL.

It should look like:

https://\<url\>/spaces/removespace.action?key=\<spaceKey\>

You should be able to delete the space key that way...

comments: author: Amey Nevrenkar
body: hi Jeremy

Thanks for the reply.

I tried that method, but it gives the same page not found error.


author: Jeremy Largman
body: Try <http://confluence.atlassian.com/display/CONFKB/Unable+to+Delete+Space> as well.

In times of desperation - and maybe you're there - you can go for the hack the database technique. We wrote this up as a knowledge base article as a last-ditch effort:

<http://confluence.atlassian.com/display/CONFKB/How+to+Manually+Delete+a+Space>

Be careful with that one...
what determines size of PDFs using ViewFile?
Asked by Lori Brooks-Manas:

When we use ViewFile, Word documents are nice and large and easy to read. When using it for PDFs, the PDF is small and hard to read. Is there a way to control the size of the PDF? Thanks!


Answers:
author: JenniferC
body: The viewfile macro for PDF files has height and width parameters that you can use to enlarge your PDFs. But beware this could have performance issues due to the rendering of larger files.

Usage would be:

{viewfile:myfile.pdf\|height=900\|width=700}

Undocumented features :)
Multiple people updating a page, different color for each user
Asked by simon roberts:

Hi, is there away to simulate the Track Changes that word has? For example, if we have 3 people making updates to 1 document/page, can the individual peoples contributions automatically be created in a different color?

Or any other thoughts on how to best track changes visualy on the page (not going to version control)?

Thanks!


Answers:
author: Edwin Dawson
body: Hi there Simon, sadly in Confluence there is no such feature, it has one form of file comparison only (Red = content deletions, Green = additions, Blue = changes).

Considering that, there's not many options available. Perhaps you could write a plugin to create this functionality, or open a request for the Confluence developers in the Confluence project at [jira.atlassian.com](http://jira.atlassian.com).

There's this page, which gives a comparison of various diffing functionality available in wiki products: <http://blog.jnolen.com/2005/02/11/wiki-diff/>
Macro inside macro?
Asked by Elliott Ing:

I'm using Confluence with the Scaffolding plugin. I've got a frield called \`postcode\`, and I can get the value from it using report-info. However, when I try to embed this value inside another macro (in this case, the google maps one, to have an automatic map of the location), it fails. {report-info} returns the value correctly, but the outer macro is printed (so I see the {googlemaps-etc} text on the page), rather than being rendeder.

Can anyone suggest how to do this?


Answers:
author: David Peterson
body: Hi there,

I'm assuming you're trying something like this:

```
{my-macro:someParam={report-info:data:My Field}}
```

As you noted, that won't work - it's simply not how Confluence parses macros. There is a workaround however. You can 'inject' values into other macros by using the {report-on:injected=true} macro that comes with the Reporting Plugin. You can also use the {replace-and-render} macro from Adaptavist, but I'll leave that example for others.

To to use {report-on} in this situation, it would be something like this:

```
*My Parameter Value:* {text-data:My Parameter Value}
```

```
{report-on:injected=true}{some-other-macro:theParameter=%data:My Parameter Value%}{report-on}
```

The '%...%' markup is pasted in before the {some-other-macro} is executed, which should achieve what you're after. Check out the documentation for more details:

<http://wiki.customware.net/repository/display/AtlassianPlugins/report-on>

<http://wiki.customware.net/repository/display/AtlassianPlugins/Suppliers>

Hope that helps!

Regards,

David Peterson


Tags: scaffolding
Twiki MAKETEXT macro conversion
Asked by Adil Fulara:

I am trying to convert a twiki wiki to confluence.

The importer completes successfully but on the page i do see that

%MAKETEXT{"Available Information"}%

instead of

**Available Information**

which is what i see in twiki.

Any help would be beneficial.

Thank you,


Answers:
author: Laura Kolker
body: Sounds like you have a type of twiki markup that there isn't currently a converter for.

I'm hearing that maybe you want instances of

```
%MAKETEXT{"foobar"}
```

to be turned into

```
*foobar*
```

which is confluence bold syntax.

If that's the case, you could try adding (untested, but should work) the following converter to your converter.twiki.properties file

```
TWiki.6600.maketext2bold.java-regex=%MAKETEXT\{\"(.*?)\"\}{replace-with}*$1*
```


author: Ellen Feaheny [AppFusions]
body: Here's a checklist to help you think through all the different syntax challenges.

<https://www.appfusions.com/display/Dashboard/Wiki+Migration+Checklist>

Ellen

comments: author: Adil Fulara
body: Thank you Laura and Ellen.

Does UWC remove Twiki related page data during conversion?

Adil.


author: Laura Kolker
body: @Adil

Well, yes? The UWC transforms source wiki data to confluence style data with the general goal of maintaining the underlying meaning of syntax and metadata, if possible. As an example, twiki and confluence color macro syntax is very different, so the idea is that the twiki syntax that indicates color would be removed and replaced with something that Confluence can render.


Tags: twiki

universal-wiki-converter
Code that lists all users that have access to a space?
Asked by Carlos Figueroa:

I have searched through various forums and such and cannot find how to do this. I would like to add code to a page that basically then will list every user that has access to that space. Preferably, it could also give other attributes of the user, but if all I get is a listing of names, that would be sufficient.


Answers:
author: Bob Swift (personal)
body: We use <https://www.adaptavist.com/display/AtlassianConfluence/space-access+macro>

comments: author: Carlos Figueroa
body: Bob, the space-access macro is the same one that Matthew tried to show me how to add. I followed the instructions, but to no avail... <http://confluence.atlassian.com/display/DISC/Space+access>


author: Bob Swift (personal)
body: No, it is not a user macro. Here is a better link: [Page Access Macro](https://studio.plugins.atlassian.com/wiki/display/CPAM)


author: MatthewC
body: Hello,

I presume that you want a list of users that anyone can see?

you could write a user macro with the reporting plugin:

<http://confluence.atlassian.com/display/DISC/Space+access>

comments: author: MatthewC
body: BTW be careful with this.... if you have lots of users \& have open spaces it can be a bit of a resource hog


author: Carlos Figueroa
body: Thanks Matthew. I followed the instructions on the link you gave me, but it did not work. But thanks, I know I am getting closer...


author: MatthewC
body: Have you go the reporting plugin installed? <https://plugins.atlassian.com/plugin/details/186>


author: Carlos Figueroa
body: Yes, I do. But it still gives some kind of error.


author: Benny Varughese
body: I tried this as well and have a question. Does this macro returns all users over all spaces? I tried this out in different spaces and seems to me like the result is the same
Problem upgrading from version 2.8 to 3.5
Asked by Craig Hannah:

I'm attempting to upgrade our version 2.8 to version 3.5. I'm doing my initial testing in a QA environement and am encountering some problems. Some of the details of the install are:  

Old version: confluence-2.8.1-std.tar.gz  
New version :confluence-3.5.7-std.tar.gz  
Java version: jdk1.6.0_24  
Using Oracle 10g via a datasource  
Using Confluence's standalone user management.  
I've read through all the release and upgrade notes  

What I have done is:  

Installed the application  
Configured server.xml, web.xml, confluence-init.properties, setenv.sh  
Loaded our test Oracle schema with a dump of our prodution one  
Copied our prduction Confluence data directory to a QA counterpart (pointed to by the conf-init prop file)  

What happens is:  

Accessing the app I am prompted to enter the upgraded developer license (on a fixonly/fixlicense.action screen)  
I am told the update was successful and to restart Confluence  
I do and recieve about 75 ddl traces (eg alter table, create index)  
Startup completes in 5 minutes  
Accessing the app again, I recieve an error message saying - 'Upgrade failed. Please consult the system logs for details. You will need to fix these problems, restore your database and confluence home directory to the pre upgrade state.'  
Looking through all the logs that have been touched, there are no entries indicating an error situation  

What makes this even more odd is that on my first attempt to do this upgrade I had a Confluence data directory from, what I believe, was an old 3.2 upgrade attempt. Going through the same process as above, everything worked fine  

I appreciate any thoughts you might have about where the problem is.  

Thanks,  

Craig Hannah


Answers:
author: Jeremy Largman
body: Hi Craig,
> Looking through all the logs that have been touched, there are no entries indicating an error situation

I'd double-check this. One guess I have is that you're looking in the wrong place. The atlassian-confluence.log is actually in the confluence-home directory (the data directory you copied from production). Make sure you're checking the logs folder in there. If you can find the snippet, post it here.

This seems like a good candidate for a [support ticket](http://support.atlassian.com). You might want to open one and our team will inspect the logs.


author: Craig Hannah
body: Hi Jeremy,

Thanks for you answer. You were correct, the atlassian-confluence.log in the data directory did in fact have the offending error. The upgrade was failing because the global logo couldn't be found in the attachment directory. I manually placed the file it was looking for in the spot it was looking and everything went smoothly.

Thanks again,

Craig

comments: author: Richard Yale
body: Hi Craig,

Be sure to accept Jeremy's answer if it helped you solve the issue :)
Set style for TaskList`s line depends on priority, completed and so on
Asked by artem chuguntsev:

Hi! I use Confluence v 3.3.1.

I use tasklist macro in my space, and i want to set its own style for completed task, task with high priority and so on. Here I\`ve seen completed tasks and not completed tasks have different style so it is very suitable to recognize task with different status in this pic [http://confluence.atlassian.com/download/attachments/224399495/DynamicTasklistProgressBar.png?version=1\&modificationDate=1206683502794](http://confluence.atlassian.com/download/attachments/224399495/DynamicTasklistProgressBar.png?version=1&modificationDate=1206683502794) (<http://confluence.atlassian.com/display/CONF33/Tasklist+Macro>).

I wanted to do the same, but I could not. Tell me, please, how I can control styles of TaskList in Confluence?

P.S. I know css class described style of completed task is 'closed unlocked task with medium priority completed'. But i didn\`t find any class like this to rewrite it in files located in "css" folder of Confluence.


Answers:
author: BenA
body: > I know css class described style of completed task is 'closed unlocked task with medium priority completed'. But i didn\`t find any class like this to rewrite it in files located in "css" folder of Confluence.

Have you tried defining your own, new style rules using those classes? eg:

.task-list .closed.high.priority { /\* styles for high priority \*/ }

.task-list .closed.medium.priority { /\* styles for medium priority \*/ }

...etc? You can put this into your space or global CSS.

(It's a good idea to use .task-list as a form of namespace/scope)


Tags: css

tasklist
How can I use excerpt:hidden=true in a template with textarea
Asked by RomanP:

Example template:

{excerpt:hidden=true}  
@EXCERPTData\|textarea(5x10)@  
{excerpt}  
When using this template, the textarea doesn't show up and after clicking 'Insert Variables' it creates an empty page

Using the same template without 'hidden=true', the textarea shows up, but the the 'excerpt' is not hidden


Answers:
author: David Peterson
body: I don't think there's any way of achieving it with standard templates, but you can certainly do it with the Scaffolding Plugin. Something like this:

```
{hidden-data}
```

```
{excerpt-data:Excerpt|type=area|width=400px|height=5em}
```

```
{hidden-data}
```

I guess an alternative would be using {hide-if} from the Visibility Plugin (or the similar {builder-hide} macro from Adaptavist's Theme Builder), something like so:

```
{hide-if:action=view}
```

{excerpt:hidden=true}

@EXCERPTData\|textarea(5x10)@  
{excerpt}

```
{hide-if}
```

Hope that helps!

comments: author: RomanP
body: Thanks a lot,

I used {hide-if} and that worked.
Link Page Name By Macro
Asked by David Gersh:

Problem: I want to create a dynamic link to the current page based on the title of the current page.

I had our confluence admin create the macro which I found at:

<http://confluence.atlassian.com/display/DISC/Show+Page+Name+as+Link>

This seems to work once, however, when the link is rendered it shows up with at + but then does link to the page properly when clicked.

The problem is when the page is edited, the text \[{pagename}\] has been replaced with:

\[{pagename}  
\&linkCreation=true\&fromPageId=38176348" class="createlink"linktype="raw" wikidestination="{pagename}  
" originalalias="{pagename}  
" \>{pagename}  
\|/pages/createpage.action?spaceKey=ClientEngineering\&title=%3Cdiv%20class=\]

Anyone have an idea?


Answers:
author: David Dube
body: You could use report-info... something like:

\[{report-info:page:title}\]

Let's say you wanted to use the title of the parent page as a prefix, you could do something like:

\[{report-info:page:parent \> page:title} Your Wiki Suffix\]

I recently coded up a navigation bar that allowed somone to "click" to create sub sections within a project area using the reporting macro in conjunction with the add-page macro to attempt to push naming consistancy within a project. For each subsection within a project, I had the following code (edited for the specific section):

{report-list}{local-reporter:page:parent \> content:children} {content-filter:@self\|labels=+fy12_actions} {local-reporter}{report-body}{report-link}Action Items{report-link}{report-body}{report-empty}{add-page:allowRename=true\|template=FY12 Project Actions\|live=true\|name=%content:title% Action Items\|parent=@parent}Action Items{add-page}\\\\{report-empty}{report-list}

Hopefully that gives you some ideas...

Dave
How to show more results with the {contentbylabel} macro?
Asked by MICHAEL O'Neill:

The {contentbylabel} macro seems great, but if there are more results available than the specified display limit, it just displays a message that tells the user that they are seeing only a partial list (see capture below), and doesn't provide a means for them to see more.

![](http://i.imgur.com/KFxhV.png)

I notice that the {recently-updated} macro anticipates this and provides an ability to see more results... How do I get this behavior in {contentbylabel}?

![](http://i.imgur.com/ISJQQ.png)


Answers:
author: Edwin Dawson
body: Hi there Michael, that feature currently doesn't exist, new code would be required to extend the functionality of this macro.

For feature requests, you can raise issues for the Confluence development team directly, in the Confluence project at [jira.atlassian.com](http://jira.atlassian.com).

I hope this helps.


author: Jeremy Largman
body: If you're interested in developing this into a new macro, you can check out the source in the [Content Survey plugin](https://studio.plugins.atlassian.com/source/browse/CKBSP). There's a '[dynamiccontentbylabel](https://studio.plugins.atlassian.com/source/browse/CKBSP/trunk/src/main/java/com/atlassian/confluence/plugins/knowledgebase/labels/DynamicContentByLabelMacro.java?r=157014)' macro that takes a parameter for number of results.


Tags: content-by-label

macro

recently-updated
How do I convert template-input data to external (SQL) DB entry?
Asked by Tom Crapper:

OK,

So, now I (kinda) know how to take .csv or SQL data into a report format (<http://confluence.atlassian.com/display/DISC/Confluence+Reporting+HOWTO>), I now have another question:

USE CASE:

A user accesses a pre-defined template in a space and fills the variable fields with his data. This will automatically create a page in that space. That page data, using the variables in the template as fields, populates an external SQL DB.

QUESTION:

Is there any way of automatically taking those templated variables and adding them to an external DB repository (say in SQL)?

I am looking for a way of getting my users to enter data about 'People', 'Places' and 'Events' using conflucence as the entry portal, but want to allow all users to then cleverly manipulate, search and report on that information from a SQL DB back into Confluence.


Answers:
author: Bob Swift (personal)
body: Have you thought about using the [Run Plugin](https://studio.plugins.atlassian.com/wiki/display/RUN) to input the data into an sql update statement ([SQL Plugin](https://studio.plugins.atlassian.com/wiki/display/SQL)) and then regular queries? [](https://studio.plugins.atlassian.com/wiki/display/SQL)

comments: author: Tom Crapper
body: Bob, thanks for this - pure gold.

Looks like what we'll do is:

a. work out how to importa/call foreign classes in Confluence

b. figure out how to map the input fields into the SQL query

c. setup the datasource

d. work out how to differentiate between an insertion and an update.
code wiki doesnt show anymore ?
Asked by Michael Regelin:

Hello,

I have just installed the Confluence beta 4.02.

I have no way to see the wiki markup of a page. I can see the storage format ?? and the view source show the exact page when editing a page...

My first test, was to use a global template from a 3.4 confluence version. I can see that it still works.

So what about the *old fashion* wiki markup ??

Thanks for help.

Michael


Answers:
author: Nic Brough -Adaptavist-
body: There is no wiki markup in version 4.x, it's been deliberately removed. See <http://confluence.atlassian.com/display/DOC/Confluence+4.0+Editor+-+What%27s+Changed+for+Wiki+Markup+Users>


author: David Peterson
body: FYI, there does exist a plugin that will add a menu item for viewing the storage format for a page. However I believe it is only installed by default when using the Plugin SDK and the 'atlas-run' (and related) command. That said, I'm sure it exists in the Atlassian Maven repostiory, so it should be possible to track down and install in 'standalone' installations.


author: Sherif Mansour
body: Michael,

You can [learn more about Confluence 4.0 here](http://confluence.atlassian.com/display/DOC/Planning+for+Confluence+4.0). We have videos, demos, tutorials and FAQs about why we are making this big change. You can still write wiki markup in the new editor and it will convert for you on-the-fly. In additon, as David said, for plugin developers you can still see the storage format.

Sherif
Search result page, showing a full path to result
Asked by Nic Brough -Adaptavist-:

When reading through the search results, such as ht[tp://confluence.atlassian.com/dosearchsite.action?queryString=3.5+search+results\&where=conf_all\&type=\&lastModified=\&contributor=\&contributorUsername=](http://confluence.atlassian.com/dosearchsite.action?queryString=3.5+search+results&where=conf_all&type=&lastModified=&contributor=&contributorUsername=)

the results come back in the form

1. Title of page (linked to page)
2. handy links
3. First few lines of text that match search
4. Space page was found in (link) and date

I've had several people ask for a display of the full path to the result. In other words, they'd like to see the tooltop that you get when hovering over "title of page" to be displayed directly on screen.

Is this possible with any tweaking? If not, then which file do I need to look at amending?


Answers:
author: Daniel
body: You can do this with a search result renderer

<http://confluence.atlassian.com/display/CONFDEV/Writing+a+search+result+renderer>

The one used in Confluence is open source and available at

<https://bitbucket.org/rthomas/search-result-enhancer/src>

so you can tweak that one, or of course write your own own from scratch.

comments: author: Nic Brough -Adaptavist-
body: Oooh, that looks like it will solve this problem, thanks Daniel!

It might be able to help us with the fundamentally broken searching in Confluence too.


author: Ma Hao
body: Hi,

<br />

I tried to use the SearchResultRender to customize the render.

But it is not working for Confluence 5.3.

The documents seems like i do not have permission to view.

Why is that?


Tags: search