youngmon/atlassian-qna huggingface dataset:
Is there a way to include page sections in the generated table of contents when exporting to PDF?
Asked by Mark Sudolcan:

I'm exporting several subsections of my team's confluence space to serve as user guides for our client. All I get in the automatically generated table of contents is each page I am exporting. Is there a way to also include the sections on those pages?


Answers:
author: Shannon S
body: Mark,

Can you clarify what it is you need? The table of contents generates based on headings that are already in the page. When you export the page it should include all headings and text.

Can you show me what's on the page vs what's happening when you export?

Shannon

comments: author: Mark Sudolcan
body: I can certainly try to clarify, but I cannot share the pages with you. I am exporting three pages as PDF documents. The TOC includes one entry for each page, but no information about sections/headings within those pages. I would like to not only have the pages listed in the TOC, but their sections/headings as well.


author: Shannon S
body: Mark,

I think I'm still not following, apologies.

On this page, I created 6 headings with a Table of Contents, and it does show all headings and link to them in the TOC as well:

* [Link to example PDF](https://we.tl/XMGsMMt6ap)

In each of these sections, I used h1 to make it a heading in order for the Table of Contents to link to them. Can you confirm if this is the method you're using, or something else?

Shannon


Tags: atlassian-marketplace
Why is the Personal space key a numeric key instead of name?
Asked by Michela Baca:

One of my users created a personal space however the key is a random numeric value instead the user's id? I have a mix of users that have personal spaces some have the key as their user id and some are numeric.

Thanks for the information!

Michela


Answers:
author: Kian Stack Mumo Systems
body: I just discovered that special characters in a username will result in a numeric space ID. Do your users have email addresses as usernames perhaps?

comments: author: Max Foerster - K15t
body: Good point! Was my first guess thinking of the way page names with special characters get converted in the URL as well.


author: Max Foerster - K15t
body: I think I found something in the weekly Atlassian Cloud blog post from [Mar 12 to Mar 19](https://confluence.atlassian.com/cloud/blog/2018/03/atlassian-cloud-changes-mar-12-to-mar-19-2018#AtlassianCloudchangesMar12toMar19,2018-confluence)

#### ISO27k change personal space key and name generation {#toc-hId-1401380891}

We've made a few changes to personal spaces to give you more control over your personal data. From now on:

* When you create a personal space, you'll be assigned a randomly generated spacekey and your homepage will get the title "Overview" by default. You can change the title at any point.
* Your personal space will be archived when you leave your team, and your name will be replaced with "Unknown user" throughout Confluence, including in the name of your personal space.

comments: author: Michela Baca
body: Max, thanks this is just the confirmation I was looking for. I appreciate the research and response!

Have a great day!

Michela


author: Jonathan Smith
body: Brief testing:

* Accessing a profile (clicking their user name via mention or in search results) will display \~username in URL
* Accessing personal space = ID in URL

When going to personal spaces, special characters cause the ID to occur. \~ is in your space key.

\*Hoping other champions can verify my statement\*

Regards.

comments: author: Nic Brough -Adaptavist-
body: I'll vouch for it. There might be other reasons, but you definitely get the unique numerical id for a user when a user name contains non-standard characters your setup cannot handle.


author: Michela Baca
body: Thanks for the feedback, unfortunately the users that have space URLs with a numeric id do not have special characters in their name.

It does seem like the users that most recently created personal spaces have the numeric id. Do you think this was changed in one of latest JIRA cloud deployments?


author: Nic Brough -Adaptavist-
body: It's entirely possible that Cloud has been changed to use numerics instead of login recently.


author: Tracy B
body: My personal space has been up for years and has no special characters in the name... and suddenly it shows a spacekey instead. Mysterious.
Trying to attach an xlsx file to Confluence using python3, getting an unsupported media type error
Asked by Marisa Voss:

Please help. I've looked at the API, but this is still not working. Every time I try to change the headers or media-type Confluence does not accept it. I know that I'm in the right space as far as Confluence is concerned. The file is not corrupted since I can open it in Excel. If anyone can help me on this I would greatly appreciate it.

My code is below:

req = requests.Session()  
print("Hello")  
url='[https://confluence.\<mycompany\>.com/rest/api](https://community.atlassian.com/t5/Confluence-questions/Why-Unsupported-Media-Type-Error-when-attaching-xlsx-file-to/qaq-p/770216)'  
base_url = url  
att = {'file': open("items-list2.xlsx", 'rb')}  
headers = {"X-Atlassian-Token": "nocheck", "Content_Type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "X-Content-Type-Options": "nosniff", "Accept" : "application/json"}  
print("base: {} with spreadsheetml.sheet".format(base_url))  
attID = 'myAttID'  
r = req.get('{}/content/{}'.format(base_url, attID), headers=headers, auth = (username, password), files = att)

if (r.status_code \< 300):  
print(r.headers)

print(r)  
print(r.text)  
print(" ")  
print('\~\~\~\~ failed to upload file \~\~\~\~')

The Error I receive:

\~\~\~\~\~\~\~\~\~\~\~\~  
\<Response \[415\]\>  
\<!DOCTYPE html\>\<html\>\<head\>\<title\>Apache Tomcat/8.0.48 - Error report\</title\>\<style type="text/css"\>H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}.line {height: 1px; background-color: #525D76; border: none;}\</style\> \</head\>\<body\>\<h1\>HTTP Status 415 - Unsupported Media Type\</h1\>\<div class="line"\>\</div\>\<p\>\<b\>type\</b\> Status report\</p\>\<p\>\<b\>message\</b\> \<u\>Unsupported Media Type\</u\>\</p\>\<p\>\<b\>description\</b\> \<u\>The server refused this request because the request entity is in a format not supported by the requested resource for the requested method.\</u\>\</p\>\<hr class="line"\>\<h3\>Apache Tomcat/8.0.48\</h3\>\</body\>\</html\>

\~\~\~\~ failed to upload file \~\~\~\~


Answers:
author: kennyngkk
body: [@Marisa Voss](/t5/user/viewprofilepage/user-id/1208390) It looks like the issue is resolve on another page.

* <https://community.atlassian.com/t5/Confluence-questions/Why-Unsupported-Media-Type-Error-when-attaching-xlsx-file-to/qaq-p/770216#U787118>

I will mark this as answer to help other community if they have stumble on to this thread.


Tags: python

atl-adm

attachment

ms-excel
Confluence User Macro to justify text
Asked by Nico n:

Hello,

I would like to write a user macro very simple in order to justify text. How I can do ?

thanks in advance


Answers:
author: Alana Fernando
body: hi [@Nico n](/t5/user/viewprofilepage/user-id/6982),

Try below code and let me know whether this helps ??

```
## Developed by: Alana Fernando
## Date created: 19/04/2018 
##Shared with love...



<div>
 <p class="txtAlgn">
 $ {body}
 </p>
</div>

<style>

.txtAlgn{
text-align :justify;
}

</style>

```

Select **Rendered** as macro body processing.

comments: author: Alana Fernando
body: Here is a much more improved version of above code.

```
## @param alignment:title=Text alignment|type=enum|desc=Choose Text alignment.|enumValues=Right,Left,Center,Justify

#if ($paramalignment == "Right")

<style>
.txtAlgn{
text-align :right;
}
</style>

#elseif ($paramalignment == "Left")
<style>
.txtAlgn{
text-align :left;
}
</style>

#elseif ($paramalignment == "Center")
<style>
.txtAlgn{
text-align :center;
}
</style>

#elseif ($paramalignment == "Justify")
<style>
.txtAlgn{
text-align :justify;
}
</style>

#end

<div>
 <p class="txtAlgn">
 $body
 </p>
</div>

```


author: Nico n
body: Many thanks Alana, very useful! :)

I have tried both with some text. They partially works, so that if I write only a paragraph then it is correctly justified, otherwise if I write two or more paragraphs, then it doesn't justify text anymore.

For example see:

<https://doc.helab.nuvolaitaliana.it/display/AEE/prova+condivisione+2>

Anyway this macro is very useful and I appreciated a lot. Thanks :)


author: Alana Fernando
body: [@Nico n](/t5/user/viewprofilepage/user-id/6982) try below change in above code. it should surely solve this issue.

```
<div class= "txtAlgn">
 <p>
 $body
 </p>
</div>
```


author: Marina Kovacevic
body: Where should we add this code?


author: Meg Holbrook
body: Hi Nico,

Adaptavist has created a server-version app that has this macro included:

[Content Formatting Macros](https://marketplace.atlassian.com/plugins/com.adaptavist.confluence.contentFormattingMacros/server/overview)

If you're trying to do this on Cloud, I don't think it's possible.

comments: author: Nico n
body: Thank you Meg, I know about this plugin but it is not free. I need to write a user macro (very simple) only to justify text.

thank you anyway


author: Meg Holbrook
body: I've found only that you can do this with the HTML macro utilizing justify code.

Obviously it's possible since Adaptavist has figured it out, but I'm not able to assist with that.


author: Nico n
body: thanks anyway :)


Tags: user-macro
Remove Top NAV
Asked by Igor Goncalves:

Hello everyone, I'm starting now at the confluence and I'm trying to remove the navtop for users, where it would only appear the sidebar for navigation in the documentation that I intend to create. Can you help me?


Answers:
author: Jonathan Smith
body: One of the differences between**Cloud** and **Server** is the look and feel.

If you do want to modify the global navigation, you can try a couple things:

* Change the global CSS to hide elements
* Download a theme add-on (example: Brikit or RefinedTheme) and configure accordingly

Hope this helps!

comments: author: Igor Goncalves
body: Okay, thank you !!!


author: Jonathan Smith
body: Hi Igor,

Are you referring to the global navigation (blue bar) or just the breadcrumbs on the top of each page?

![breadcrumbs.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/20013i34234BB3F9E5E0B8/image-size/large?v=v2&px=999 "breadcrumbs.jpg")

comments: author: Igor Goncalves
body: Hi Jonathan,

I'm referring about a blue bar.


author: Igor Goncalves
body: I'm trying to leave it like this

[https://kayako.atlassian.net/wiki/spaces/DEV/pages/4817002/Kayako+REST+API](https://kayako.atlassian.net/wiki/spaces/DEV/pages/4817002/Kayako+REST+API "OPEN")

comments: author: Jonathan Smith
body: Are you on Confluence Cloud or Server?

Note: Your example points a cloud instance.


author: Igor Goncalves
body: I just downloaded the confluence and installed local.


author: Jonathan Smith
body: One of the differences between Cloud and Server is the look and feel.

If you do want to modify the global navigation, you can try a couple things:

* Change the global CSS to hide elements
* Download a theme add-on (example: Brikit or RefinedTheme) and configure accordingly

Hope this helps!
Is there a way to edit RSS feed macro?
Asked by Sven Giesemann:

I would like to change the design of the RSS feed. Removing table border and the bold font. Is there a way to edit the macro?


Answers:
author: Patrick Cartier [Candylio]
body: Hello [@Sven Giesemann](/t5/user/viewprofilepage/user-id/1253729),

In order to do this you will need to create your own user macro. You cannot edit existing macros outside of their visible parameters.

comments: author: Sven Giesemann
body: Thank you for your answer. As I am not a developer and rather new to Confluence: Can I copy the macro and change its behaviour to adjust it to my needs?


author: Patrick Cartier [Candylio]
body: I looked around a bit for a copy of the code for the macro but couldn't find much. I'd be interested to see if anyone else can find anything, if not maybe try looking into this plugin from K15t. I read somewhere they have a way to edit a blogpost RSS feed so maybe it can do more.

<https://marketplace.atlassian.com/plugins/com.k15t.scroll.scroll-viewport/server/overview>
Set home page for confluence
Asked by Raoul Kaiser:

Everyone on the team has a different dashboard and sees something different. I would like to point everyone to a specific space when they enter Confluence not allow them to go to their dashboard. Can someone please point me to the right place?


Answers:
author: Alexis Robert
body: Hello,

you can set a default home page for all your users easily with [this guide](https://confluence.atlassian.com/doc/configuring-the-site-home-page-138140.html) !

It's pretty straightforward, let me know if you have any issues.

--Alexis

comments: author: Raoul Kaiser
body: Great. Thank you. Kept running right past it.
@ mention not updating people in the expand macro
Asked by Christine White:

Hi! I have 50+ collaborators at my company tagged in project management tables within the expand macro. When I published the page, nobody was notified/updated, and I can't figure out how to retroactively notify all people tagged within these expand macros.

Anyone have ideas on what I could do? Thanks!


Answers:
author: Jonathan Smith
body: Hi Christine,

I created a test page with an expand macro with a user mentioned within it. The user got notified once I published the page.

The only way I know to retroactively notify users in your case is to copy the page and publish it again. I tested this in my 6.6+ instance and the user got the 2nd notification.

If I think up any other ways, I will add onto this thread.

Regards!

comments: author: Christine White
body: Thanks!


author: Max Foerster - K15t
body: Hi Christine,

are you sure that the users have not been mentioned and notified before on that page? Because mentions always only notify once on a page. So you either can follow Jonathan's approach or have to share the page with all the people again. A comment with all mentions should also be worth a try, that could work too.

Best, Max

comments: author: Christine White
body: OK, thanks!
How can I edit a page and keep a draft of it, without publishing and notifying watchers?
Asked by Charu:

I want to edit a big page and not publish it unless I am done with changes.


Answers:
author: Shannon S
body: Hi Charu,

A draft is simply an unpublished page, so by not publishing it, you are creating a draft.

Have a look at our documentation on [Drafts](https://confluence.atlassian.com/doc/drafts-149040.html) for more information.

Regards,

Shannon

comments: author: Charu
body: Many thanks Shannon for your answer. This solves my issue.

Best Regards,

Charu


author: Shannon S
body: You're welcome, Charu!

Take care,

Shannon


author: Max Foerster - K15t
body: Maybe in addition to Shannon's and Stephen's answers, have a look at this app on the marketplace: [Page Branching for Confluence](https://marketplace.atlassian.com/plugins/de.scandio.confluence.plugins.page-branching/server/overview)

It's different from the built-in functionality of drafts.

Best, Max

comments: author: Charu
body: Thanks for your inputs Max.

Best Regards,

Charu


author: Stephen Deutsch
body: Another option would be to limit the visibility of the page by adding restrictions so that only you can view the page. Then when you are ready to release you simply remove the page restrictions.

comments: author: Shannon S
body: I had thought of this as well! My concern was that Charu was modifying an existing page and didn't want to remove access to the current version.

I would prefer this method at any rate, because I'd be reluctant to rely strictly on drafts in case something were to go wrong.

Shannon


author: Stephen Deutsch
body: Good point. Thanks Shannon!


author: Charu
body: Thanks for your inputs Stephen.

Best Regards,

Charu


Tags: draft

edit
Draft spaces in Confluence?
Asked by Robert Leitch:

We need to rewrite some existing (published) documentation in Confluence.

What's the standard way to do the rewrite separately (without touching the published docs) and then publish them all to that space when done? Such that all the page addresses will remain the same, and links between them will work.

My rough idea at the moment is to copy existing docs to a private (draft) space, edit them there (making sure that links point to pages in the existing public space), but then... can we overwrite the published space with the edited docs?

No plugins please.

Cheers!


Answers:
author: Manon Soubies-Camy
body: Hello Robert,

I can't think of any easy way to do this without plugin - just FYI, [Comala Workflows](https://marketplace.atlassian.com/plugins/com.comalatech.workflow/server/overview) would help you in this case.

To keep the same page URL, I guess you could do a simple copy/paste from the duplicate page where you'll be working to the published one. But that may take a lot of time if you have several published pages.

You could also export your published pages to Word, work on it and then reimport it into Confluence. See [this documentation](https://confluence.atlassian.com/doc/import-a-word-document-into-confluence-170493136.html#ImportaWordDocumentintoConfluence-Importoptions):
> * **Replace \<page name\>** - content will be imported into the current page.

Interested to hear what others may think of!

- Manon

comments: author: Robert Leitch
body: Thanks Manon, great suggestions!  

Copypasting might just be the easiest way to go. Compared to the time spent rewriting a single page, it won't add significant overhead.


author: Maria Lysedal
body: Hello Robert

When we need to do changes to published pages we save them as drafts, do the changes and once ready to publish I go to my drafts and Save, so that they get published.

<https://confluence.atlassian.com/confkb/how-do-drafts-work-on-confluence-938043306.html>

I find that easier than copy/pasting or export/import

Maria


Tags: draft

space
How to move filtered table from one page to the other page ?
Asked by satheeskumar:

Need is to create table out of filtered results from the base table and create jira issues from it


Answers:
author: Andrey Khaneev _StiltSoft_
body: Hello,

There is an [open ticket](https://jira.atlassian.com/browse/CONFSERVER-55170) related to your question.

And here is a workaround if the base table is a common manually created table, you are using [Table Filter](https://marketplace.atlassian.com/plugins/com.stiltsoft.confluence.plugin.tablefilter.tablefilter/cloud/overview) macro and you are on Confluence Server (not Cloud):

* Edit the page.
* [Filter the table in page edit mode](https://docs.stiltsoft.com/display/TableFilter/Filtering+Table+in+the+Page+Edit+Mode).
* [Copy](https://docs.stiltsoft.com/download/attachments/2785540/image2017-4-17%2013%3A54%3A1.png?version=1&modificationDate=1492426439000&api=v2) and paste the filtered table.
* Save the page.
* Create Jira issues from filtered copy of the table.
Scheduled upload for a file attachment
Asked by Beni Pla:

Good afternoon,

I need to attach a file to a page in Confluence, but I need to do it automatically (the file is located in a local folder in my PC).

Is it possible to configure an automatic upload of a file in Confluence?

Thanks in advance


Answers:
author: Shannon S
body: Hi Beni,

You'd need an add-on for this.

Perhaps you could use it with Dropbox? There are [a few marketplace add-ons](https://marketplace.atlassian.com/search?product=confluence&query=dropbox) that will do that.

Regards,

Shannon


Tags: atlassian-marketplace

attachment

automation
JENKINS ---> Confluence
Asked by Hamed Gara:

Can somone tell us how to publish html report into confluence page, using confluence publisher plugin of Jenkins ?


Answers:
author: Gavin McDonald
body: I assume you have read and gone through the plugin documentation :-

<https://wiki.jenkins.io/display/JENKINS/Confluence+Publisher+Plugin>

If so, what errors are you getting,what is happening when you try and use it?

Also note that the plugin has not been updated in 5 years so likely not compatible with recent Confluence versions.

comments: author: Viktoriia.Kakhniy
body: Hi [@Gavin McDonald](/t5/user/viewprofilepage/user-id/952190) ,

Could you please suggest alternative ways to solve this problem in case I deal with new Confluence versions?

I know that it is possible to do it via Confluence API directly, but maybe there are some easier ways?


Tags: cucumber

jenkins

report
Process to upgrade Add-Ons from confluence 5 to 6
Asked by Shanker P:

Is there any document available, which instructs on how to upgrade or modify custom add-ons that were developed for confluence 5 to confluence 6?

Sometimes the same Add-On which was written for confluence 5 will work on confluence 6 also. But just want to know the proper way to upgrade the custom Add-On.


Answers:
author: Shanker P
body: Thanks for the reply Alexis.

But I am looking for the process to modify or upgrade the custom add-ons that were developed by us for confluence 5 to work with confluence 6.

Thanks,  
Shanker.


author: Alexis Robert
body: Hi,

you should probably just check the add-on page on the Marketplace, it will be clearly shown what versions are supported.

Otherwise, just connect to the Marketplace from Confluence and you'll see what plugins are eligible to upgrades.

--Alexis
No blog post option
Asked by Ronan van Stokkom:

Dear reader,

When I click the option create there is no option to create a blog post.

The space is setup by someone else. I do have Admin rights and stuff.

![2018-04-18 09_20_22-Sametime Appshare Highlighter.png](/t5/image/serverpage/image-id/19939iCE074D5591B387A9/image-size/large?v=v2&px=999 "2018-04-18 09_20_22-Sametime Appshare Highlighter.png")

If anyone could help me out then that would be great. I think someone disabled it and would like to enable it again.

Ps: There are some custom-made templates. So I think some has been messing with it.

Kind regards,

Ronan


Answers:
author: M Amine
body: Hi Ronan,

You are right. Templates can be customized/enabled/disabled/promoted per Space.

The screenshot below shows how :

![Capture d??cran 2018-04-18 ? 08.56.56.png](https://community.atlassian.com/t5/image/serverpage/image-id/19951i7A803ED0F18FE501/image-dimensions/571x249?v=v2 "Capture d??cran 2018-04-18 ? 08.56.56.png")


Tags: blog