youngmon/atlassian-qna huggingface dataset:
How to generate private key when using Confluence with Apache?
Asked by igpphelpdesk:

Hi.

Looking for step-by-step instructions on how to generate a private key to request an SSL certifcate for a Confluence instance running behind Apache Reverse Proxy. I'm assuming the instructions here:

<https://confluence.atlassian.com/doc/running-confluence-over-ssl-or-https-161203.html>

do not apply, since we are using Apache. Thanks!


Answers:
author: AnnWorley
body: If I understand correctly, you would like to generate a private key and a certificate signing request to request a cert you can use to terminate SSL at your Apache reverse proxy. Please check out the heading: *Generate a Private Key and a CSR*on this page:

[OpenSSL Essentials: Working with SSL Certificates, Private Keys and CSRs](https://www.digitalocean.com/community/tutorials/openssl-essentials-working-with-ssl-certificates-private-keys-and-csrs)

comments: author: igpphelpdesk
body: Thanks, Ann. I'll give that a try.


Tags: apache

configuration

ssl
How do I use Rest to change the document that displays on my home page?
Asked by mark mark:

I am trying to write python to use Rest and change the word editor-in-lin-macro that is displayed on my home page.

Currently users can drag and drop new word or excel files into the macro for word editor showing on the home page.

After attaching a new file I would like to be able to go to the page and change the file that is displayed to the file that was just recently attached.

Is there any way to do this with REST API and Python using OAuth?


Answers:
author: Mirek
body: I am wondering if the attachment cannot be simply updated with the same name and it should make a new version and then it would update also on a page.

Anyway it should be possible to achieve that with no problem with Python and rest api

Similar question

<https://community.atlassian.com/t5/Confluence-questions/Append-content-with-Python-to-an-existing-Wiki-Page-via-REST-API/qaq-p/1509335>
How do I attach a document in confluence using Python with an Oauth Token?
Asked by mark mark:

I would like to attach files to confluence from the rest API using Python with Oauth.

I was trying with the code below but I get the following error message

Unsupported Media Type

description

The server refused this request because the request entity is in a format not supported by the requested resource for the requested method.

```
fileinfo = open(filename, 'rb')files = {  'file': fileinfo}headers = {'X-Atlassian-Token': 'no-check'}headers['Content-Type'] = 'text/plain'url = self._get_url('content/'+str(contentId) + "/child/attachment")r = self._session.post(            url, files=files, headers=headers)#Where _session is my ResilientSession with Oauth info already setup
```


Answers:
author: mark mark
body: I was able to get this to work with the following code modified from the jira client, that came from pip install jira.

```
 def content_attachment(self, contentId, filename):        url = self._get_url('content/'+str(contentId) + "/child/attachment")        #attachment will also work if you just pass the filename        attachment = open(filename, 'rb')        result = None        try:            if 'MultipartEncoder' not in globals():                #method = 'old'                result = self._session.post(                    url,                    files={                        'file': (filename, attachment, 'application/octet-stream')},                    headers=CaseInsensitiveDict({'content-type': None, 'X-Atlassian-Token': 'nocheck'}))            else:                #method = 'MultipartEncoder'                    def file_stream():                    return MultipartEncoder(                        fields={                            'file': (filename, attachment, 'application/octet-stream')})                m = file_stream()                result = self._session.post(                    url, data=m, headers=CaseInsensitiveDict({'content-type': m.content_type, 'X-Atlassian-Token': 'nocheck'}), retry_data=file_stream)        except JIRAError as e:            if e.status_code == 400:                logging.error(str(e))                return            raise        if not result or not isinstance(result, collections.Iterable):            raise JIRAError("Unable to parse JSON: %s" % result)        for data in result:            print (data)            for fields in result.get(data):                print (fields)                return fields.get("id")        return json_loads(result)
```
Search in document preview
Asked by Martin Krivosik:

Is there a possibility to search in the document preview?

I cannot even use CTRL+F to find in page when using document preview.

I know I can use search to find the document (attachment) which contains the string, but then if I open the doc I have no way of finding that information other than scrolling through the whole document which is no use as we have documents containing tens to hundreds of pages.


Answers:
author: AnnWorley
body: I can use command-F on my Mac to search an attachment preview. The Edit pulldown menu on your OS should reveal the keyboard shortcut:

![find.png](https://community.atlassian.com/t5/image/serverpage/image-id/890i13CB8F914F01A18D/image-size/large?v=v2&px=999 "find.png")

comments: author: Martin Krivosik
body: Hi Ann,

Shortcut in Windows environment is CTRL+F, but it does not work.

I have tested it in Chrome \& Firefox.

Is this a bug where Confluence in Windows environment prevents the CTRL+F shortcut?


author: Martin Krivosik
body: Correction:

I can use "Find in page", but only if going through the Tools menu. CTRL+F does not work.

![ConfluenceSearch.png](https://community.atlassian.com/t5/image/serverpage/image-id/917iB660412BC547A5FB/image-size/large?v=v2&px=999 "ConfluenceSearch.png")


author: Steffi Frank
body: same here (firefox)


Tags: preview

search
How to link to a section of a page with a dash in the title (like for an ISO date)?
Asked by Volker Hetzer:

We have a set of review pages that look like "2017-05-03 Review (Edit and Create Pipes)".

In there, the headings like "Review comments" should be anchors.

So, how would an url look like then?

<https://wiki.xxx.com/display/YYY/2017-05-03%20Review%20(Edit%20and%20Create%20Pipes)#2017-05-03Review(EditandCreatePipes)-Review+comments>

gets me to the page but not to the section.


Answers:
author: Craig Nodwell
body: Did you get this figured out?


Tags: anchor
Attach a document in JIRA and it reflect on Confluence
Asked by Swarna Radha:

Hi,

I want to know if there is a possible way when you attach a document in an issue in jira and can retrieve the same document in Confluence.

Is there any add-ons???

Thanks \& Regards,

Swarna


Answers:
author: AnnWorley
body: If the document "lives" in Confluence there is a plugin to allow you to access it on a JIRA ticket:

[Comala Share It](https://marketplace.atlassian.com/plugins/com.keinoby.confluence.plugins.share-attachments/server/overview)

[How to Use Confluence Attachments in JIRA](https://wiki.comalatech.com/display/SI/How+to+Use+Confluence+Attachments+in+JIRA)

comments: author: Swarna Radha
body: Thanks for your assistance.

Thanks \& Regards,

Swarna


Tags: jira-software
link to search page with page ID, label and date not working after upgrade to 6.1.1
Asked by Snorri Magn?sson:

After upgrade to Confluence 6.1.1 a link to a search result page with label and date does not work, below is a link created before we upgraded Confluence and it works fine:

[https://wiki.company.com/dosearchsite.action?cql=space+%3D+%22spacename%22+and+label+%3D+%22meetings%22+and+title+\~+%22%5C%222017-03%5C%22%22](https://wiki.company.com/dosearchsite.action?cql=space+%3D+%22spacename%22+and+label+%3D+%22meetings%22+and+title+~+%22%5C%222017-03%5C%22%22)

Now we get this link when we copy URL from the search page with same label and date. (seems like it adds number 25 in the url:

[https://wiki.company.com/dosearchsite.action?cql=space+%253D+%2522spacename%2522+and+label+%253D+%2522meetings%2522+and+title+\~+%2522%255C%25222017-04%255C%2522%2522](https://wiki.company.com/dosearchsite.action?cql=space+%253D+%2522spacename%2522+and+label+%253D+%2522meetings%2522+and+title+~+%2522%255C%25222017-04%255C%2522%2522)


Answers:
author: AnnWorley
body: The workarounds on this bug report should help:

[Links containing umlaut or cyrillic characters become invalid](https://jira.atlassian.com/browse/CONFSERVER-45966)

The issue was fixed in Confluence 6.2.1 so you won't be stuck with the workaround after the next upgrade.


Tags: search
Why is my new Space not shown in space directory?
Asked by Daniela Senkyrova:

Hello

I have created a new Team space on Confluence, but I cannot see it in the space directory. Any thoughts on how to fix this and make the space available to evryone on confluence?

Thank you


Answers:
author: Rebecca M.
body: Hi Daniela,

Have you created any other content recently that you're having trouble finding (i.e., using the Search box)?

Your Confluence instance may need to be re-indexed - see <https://confluence.atlassian.com/doc/content-index-administration-148844.html>.

You will need a Confluence admin to do this.

Rebecca
How can archive a page tree on confluence
Asked by Rahul Aich [Nagra]:

Hi All

We have on confluence a lot of pages (and its sub-pages) which we feel we can archive. But i do not see any option to apply archival on an entire page tree so that no one can see that page tree.

Is this possible?

Rahul


Answers:
author: Vronik
body: Hello

<https://confluence.atlassian.com/confeval/confluence-evaluator-resources/confluence-archiving-content>


Tags: archive
Allowing users to control their own trash
Asked by Martin James:

Hi all,

I've raised a **Jira** ticket as I think it would be a good idea if Confluence users are able to control their own set of deleted documents.

[CONFSERVER-52346](https://jira.atlassian.com/projects/CONFSERVER/issues/CONFSERVER-52346 "CONFSERVER-52346")

Is there anything else anyone can think of that can be added to this list?

I wanted to raise this request as it puts the responsibility of deleted documents in users hands. It allows them to restore a page if someone accidently/maliciously deletes anything.

If you're interested in the idea please **vote** and **comment** on the page ;)

![Profile-Trash.png](/t5/image/serverpage/image-id/871i2DD2EA28A3E8362E/image-size/large?v=v2&px=999 "Profile-Trash.png")![Profile-Trash2.png](/t5/image/serverpage/image-id/872i819E1900237A4AC2/image-size/large?v=v2&px=999 "Profile-Trash2.png")


Answers:
author: Jan-Peter Rusch
body: Difficult question. There might be use cases where user shouldn't be able to restore a page. Are we discussing Confluence 6 with shared editing? This adds more complexity to the subject...

What happens if an admin deletes a page containing content not to be display to public \& a user restores this page. The admin then must always purge this page or empty the trash.

Having a space permission like the delete own pages permission could be an option. I would not vote for a general permission to restore page from trash for each user.


Tags: delete

profile
Move user(s) to another directory in confluence 6
Asked by xiaobo ding:

I am on confluence 6.0.5

A custom Sso was just implemented in our confluence system so we do not need the delegate Ldap integration previously configured. We are now trying to move the users from the delegate Ldap directory to confluence internal directory.

We tried to update column directory_id in cwd_user and cwd_user_attribute table through sql, then flush the cache. For some account it worked, but for some did NOT. It was very strange and we had no idea about this.

Any guys can help?


Answers:
author: AnnWorley
body: I hope the database changes were made on a test instance, as what we are trying to do is a little dodgy. I don't have a query ready-made to accomplish it.

I wonder if the accounts it did not work for were impacted by group memberships. There is a *directory_id* column in the **cwd_group** table as well.

In fact, to get an idea of all the tables with *directory_id* , please see [How do I remove a user directory from Confluence via the database?](https://confluence.atlassian.com/confkb/how-do-i-remove-a-user-directory-from-confluence-via-the-database-308609397.html)

I see you commented on [Make it possible to move users between directories](https://jira.atlassian.com/browse/CONFSERVER-25630), thank you for that feedback to the dev team.


Tags: ldap
Link to external file is destroyed after opening the editor
Asked by thgmx:

Hi there,

in a Confluence page I add a link to a file on a server by clicking the link button, selecting Web link and adding a link to a file in UNC syntax. Before closing the editor I have this HTML code:

```
<p>This is a link to a file on a server:     <a href="file://///server/path/blah.xlsx">a_file</a></p>
```

After closing the editor the HTML code looks like this:

```
<p>This is a link to a file on a server:     <a href="file://///server/path/blah.xlsx" 
              class="external-link" rel="nofollow">a_file</a></p>
```

Then I reopen the editor and I get this:

```
<p>This is a link to a file on a server:     <a>a_file</a></p>
```

When I update this code, the link is gone. Does anybody has an idea what I am missing?

Best regards  
Bertram


Answers:
author: thgmx
body: This issue is soved since Conflunence 6.2.3


author: thgmx
body: Hi Ann,

thank you for your fast answer. I am happy that you could reproduce this behaviour.

Anyhow I am a bit confused. You wrote above "*The issue is, we don't "really" provide that functionality, so I cannot report that it is broken*".

I did not ask for a new functionality. I just added a link in a correct UNC syntax (to a file on a sever, not local). The link works fine as long as I don't reopen the editor on this page. But if I do Confluence changes the code of this link. It deletes the href attribute. I believe that this is not ok.

Best regards  
Bertram


author: AnnWorley
body: placeholder


author: AnnWorley
body: I had the same experience:

<https://community.atlassian.com/t5/Confluence-questions/Links-get-broken-when-edditing-a-page/qaq-p/458911>

The issue is, we don't "really" provide that functionality, so I cannot report that it is broken:

[Cannot link to local files from within Confluence](https://confluence.atlassian.com/confkb/cannot-link-to-local-files-from-within-confluence-216958257.html)

[Provide an option to insert a link/path to local files](https://jira.atlassian.com/browse/CONFSERVER-28497)
List the content affected when deleting a group
Asked by Anne EQS:

"Deleting a group will remove all permission restrictions associated with it. Content that is only restricted to this group will become available to all confluence users."

Thanks for the warning, but what can I do now? Is there any way to list all content confluence wide where restrictions apply for the group so I can take action and replace the group where possible

@Atlassian, would be very helpful to have that list when trying to delete a group, so one does not have to guess the effects...


Answers:
author: AnnWorley
body: Thanks for the feedback, I created a suggestion ticket for the development team based on it: [Include a page restriction and permissions report with the Delete Group warning](https://jira.atlassian.com/browse/CONFSERVER-52679). Please comment and vote on it to emphasize your use case.

In the meantime, if you have access to the database, you can find the space permissions for the group you are deleting by running the queries in this article: [How to list which spaces a group can access](https://confluence.atlassian.com/confkb/how-to-list-which-spaces-a-group-can-access-720636535.html)

For page restrictions, here are some queries I came up with on my PostgreSQL database, to get the restrictions and the page titles:

```
select cp_type, groupname, cps_id from content_perm where groupname = '<group_name>';
```

```
select id, cont_perm_type, content_id from content_perm_set where id = <cps_id_number_from_previous_query>;
```

```
select title from content where contentid = <content_id number from last query>;
```

I look forward to any follow up questions.


Tags: confluence-server

group

restriction
Confluence ToC Macro Produces Error
Asked by richardofrugeley:

When I insert the Table of Contents macro in an existing Confluence page, the following message is displayed in the Preview area:

Error rendering macro 'toc' : \[com.ctc.wstx.exc.WstxLazyException\] com.ctc.wstx.exc.WstxParsingException: String '--' not allowed in comment (missing '\>'?) at \[row,col {unknown-source}\]: \[348,41\]

The page contains some HTML to hide the Like feature:

\<!-- This is code to hide the Like feature --!\>

\<style type="text/css"\>

#likes-section{display:none  
!important;}

\</style\>

How is the error fixed?

Richard


Answers:
author: AnnWorley
body: I tested the TOC macro on a page with the following in an HTML macro:

```
<!-- This is code to hide the Like feature --!> <style type="text/css">#likes-section{display:none!important;}</style>
```

I was not able to reproduce the error. Since the error is complaining about "--" in a comment, perhaps try removing the comment from the HTML as a test.

PS - the HTML did a great job of hiding the Like feature!


Tags: error

html

macro

questions-for-confluence
How can I define a variable once in a space template and refer to its contents later in the same pag
Asked by Sean Tydings:

Apologies if this is extremely obvious and explained elsewhere.

I am creating a template for deployment instructions. I want to define a set of environmental variables once at the top of a page, and refer to the contents of these variables later in the page.

For example I want to define a version number variable once, and use its contents within the page at several places. This will be contained within pathnames etc.

Another variable would be the database name. Once defined this should be present in multiple places within the page created by the template.

Any pointers will be appreciated.

Thanks

Sean


Answers:
author: Sean Tydings
body: DOH!

I have answered my own question!

If I define a variable once at the top of my template, and refer to it in the same way throughout my template, pages created using this template correctly contain the referred values.
Can i copy an event in team calendars?
Asked by Markus Sp?thling:

Hi, i want to get an event with the same participants on irregular dates. Can i copy an event just to another date? That would make the process a lot easier for me.

TIA

Markus


Answers:
author: Marcelo Horlle
body: Hey Markus,

Unfortunately, there is not. There are two suggestions opened with Atlassian at the moment to track these changes and implement the needed feature. You can monitor them at [CONFSERVER-51237](https://jira.atlassian.com/browse/CONFSERVER-51237) and at [CONFSERVER-51365](https://jira.atlassian.com/browse/CONFSERVER-51365).

Hope it helps, have a great week ahead!

comments: author: Valbona Bushi
body: These 2 issues both show as resolved but I still don't believe there is a way to copy an event? Could you update the links to current issues around this? This is nice when the deadlines fall on something like "last business day of the month"
How to share Confluence article to confluence-users group?
Asked by Egle K.:

Quite a strange situation. We use Crowd as user/group database, and once I would like to share a post of Confluence, the search doesnt give an option to choose "confluence-users" and "confluence-administrators" groups. They do exist in Crowd, as well as are synchronized with Confluence. Also, I noticed that results pop up the group which was created in Crowd, but deleted a time ago.


Answers:
author: AnnWorley
body: I tested and got the same results, then I found this bug:

[Autocomplete does not find predefined groups when sharing a page](https://jira.atlassian.com/browse/CONFSERVER-33616)

Autocomplete does find groups I create in the UI, so a workaround would be to add everyone to another not "predefined" group, and share with that group.
How to set up a document space like atlassian document?
Asked by memorybox:

Dear all?

I want to set up a help document space like atlassian help document center.

<https://confluence.atlassian.com/doc/the-space-sidebar-777010845.html>

demand:

1. version scrolls,manage and author multiple versions of the documentation in a single space

2. custom header: just like:

<https://confluence.atlassian.com/doc/customize-space-layouts-139512.html>

3. custom sidebar to navigation, also like: <https://confluence.atlassian.com/doc/the-space-sidebar-777010845.html>

Should i buy the theme or plugins? Any suggestions?

Thank you.


Answers:
author: Jan-Peter Rusch
body: Atlassian uses the Scroll Viewport addon to modify the look \& feel of their document spaces. Extremely flexible \& powerful. There are some themes delivered with it, some can be found with uncle google/github/bitbucket...
Confluence groups and Active Directory (AD)
Asked by Kathryn Reddie:

Re : Confluence Groups

Hi Confluence gurus,

We use Confluence version 5.7 (Server), and are trying to upgrade to 6.1 in our DEV environment. We use Active Directory (AD) for our groups.

One of our senior developers tried to access Confluence in DEV, and rec'd this error ...

"maximum number of expressions in a list is 1000 -- limits the number of elements in an Oracle IN predicate to 1000 entries. However, the given parameter list \[groups\] contained 1103 entries, which will likely cause failures to execute the query in the database. "

We (Developers, Service Desk and BA's) are going through and doing a group clean-up as they have gotten totally out of hand, however, I'd like to understand more about how Confluence and AD interact.

<br />

What I am trying to ascertain is:

1. Is there a workaround or quick fix for the error message above?
2. What is the ideal size of groups for a user?
3. How does Confluence read the groups from AD?
4. Is there a way to group the AD groups into a parent and child relationship?
   1. As an example, we have 71 Media types, and each have an Edit and View group, so there are 142 groups associated with Media alone.
   2. Ideally, I would like to create a parent entitled Media and group the 142 rows under the parent.
      * Note: These were created to allow users to create, edit and view attachments in an 'in-house' application, while still allowing staff to filter and report on the different 'types'. Eg. Mediaexampletype1 or Mediaexampletype2
5. Would creating a parent/child relationship work, or is there a better way to do it?

Thanks in advance.

Kathryn.


Answers:
author: Jan-Peter Rusch
body: As I recall you can enable paged result of the AD/ LDAP queries. I would try this setting in the LDAP configuration first. You could also try incremental synchronization, if possible in your environment Check documentation:

<https://confluence.atlassian.com/doc/connecting-to-an-ldap-directory-229838241.html>


Tags: active-directory