youngmon/atlassian-qna huggingface dataset:
Please add support for anchors in the "Link suggestions" when inserting confluence links
Asked by Stefan E:

If want to insert a link I can type "\[" and get some assistance for inserting the link to another page. That is fine.

![image.png](/t5/image/serverpage/image-id/19257i77553D9A0DCBFDD8/image-size/large?v=v2&px=999 "image.png")

However, if I want to link to an anchor on that page the assistant does not help. I have to click on the hyperlink, switch to Advanced and know by myself how to exactly type the page anchor name.

=\>Please add support for anchors in the "Link suggestions".

=\>Please add some suggestions on the Advanced tab.

![image.png](/t5/image/serverpage/image-id/19261i590CFA67D69EBC7F/image-size/large?v=v2&px=999 "image.png")


Answers:
author: Shannon S
body: Hi Stefan.

This is related to this existing feature request on Cloud and Server:

* [CONFCLOUD-25533](https://jira.atlassian.com/browse/CONFCLOUD-25533)
* [CONFSERVER-25533](https://jira.atlassian.com/browse/CONFSERVER-25533)

Please feel free to vote on the request which pertains to your version of Confluence (Cloud or Server?) and comment there with your usage case.

Thank you for the recommendation!

Regards,

Shannon
How to insert link in table cell that already contains preformatted text?
Asked by Stefan E:

I would like to add a link into the table cell shown in the figure. However, the link button is disabled. This seems to be due to the fact that the text is "Preformatted" (I copied it from VisualStudio).

Is there a way to keep the font of the text (it is the name of a method in my source code) and use it as hyperlink?

Inserting links after switching to "Paragraph" works.

**It took me a while to find out why hyperlinks are not working in that table cell. \*grmpf\***

Suggestion: Enable hyperlinks for preformatted text or add a tooltip to the upper toolbar saying why it is disabled.

![image.png](/t5/image/serverpage/image-id/19241i8523F685F9E99703/image-size/large?v=v2&px=999 "image.png")

Ugly work around: Create the hyperlink elsewhere and copy paste it to the cell. That will keep the font and enable the hyperlink:

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

\<td colspan="1"\>  
\<pre\>  
\<ac:link ac:anchor="foo"\>  
\<ri:page ri:content-title="Final energy demand"/\>  
\<ac:plain-text-link-body\>\<!\[CDATA\[finalEnergyConsumption\]\]\>\</ac:plain-text-link-body\>  
\</ac:link\>  
\</pre\>  
\</td\>

If I switch to another browser tab and back, the hyperlink button seems to be enabled but it does not work (see figure below). =\>Bug in display of enabled state of the button.

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


Answers:
author: Shannon S
body: Hi Stefan,

The "Preformatted" option means there will be no formatting, which is why those options are disabled.

The workaround that Alana let you know about is actually monospace text, but it may help you in the case that you wanted your text to be monospace but linked to a URL.

I was able to confirm that if you insert monospace text instead, you will be able to select the text and link it as expected.

To insert monospace text it's as Alana mentioned, typing two curly brackets around the word you want to insert in monospace font.

Regards,  
Shannon

comments: author: Alana Fernando
body: Good explanation [@Shannon S](/t5/user/viewprofilepage/user-id/510046)


author: Alana Fernando
body: hi [@Stefan E](/t5/user/viewprofilepage/user-id/1207119) ,

Another workaround is to enter your link via markup.

```
{{[https://community.atlassian.com]}}
```
Page not found - but it shows in the side bar
Asked by Robert Tietze:

Recently I noticed that we have a few sites which are not accessible anymore, it always shows the 404 message. These sites were heavily used befor and now nobody can view them anymore. Any ideas suggestions what could be wrong?


Answers:
author: Robert Tietze
body: For some reason the page appeared now again. Problem now is, that all attachments are unknown.

comments: author: Robert Tietze
body: When I checked in the site history the last user edit (two weeks ago) was deleting all pictures and adding the "new" ones. Somebody any thoughts on this?

![confl-bug1-404.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/19276i43EBFEA2820C7D99/image-size/large?v=v2&px=999 "confl-bug1-404.PNG")


author: Thomas Schlegel
body: are you able to restore the old version of the page (before the change two weeks ago) via page history?


author: Robert Tietze
body: It took a while, but it seems to be back to normal again.


author: Thomas Schlegel
body: That's good. Maybe there was some kind of indexing problem and reindexing was triggered by opening the page. I hope, this was a one-time problem.


author: Robert Tietze
body: me too ;)


author: Thomas Schlegel
body: Hi Robert,

have a look at the recycle bin of your space, maybe you can find them there.

What is the url of the 404 page? If you see a pageID there, you can try to edit the page.

Change

\<confluence-url\>/pages/viewpage.action?pageId=123456

to

\<confluence-url\>/pages/editpage.action?pageId=123456

comments: author: Robert Tietze
body: Hi [@Thomas Schlegel](/t5/user/viewprofilepage/user-id/781483),

I just tried to enter your first suggestion viewpage.action with the page-id and now I have a flickering confluence logo :(


author: Thomas Schlegel
body: what do you mean by "flickering confluence logo"?


author: Robert Tietze
body: ![confl-bug-404.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/19275i17E29F093F6CE160/image-size/large?v=v2&px=999 "confl-bug-404.PNG")


author: Robert Tietze
body: the yellow marked logo keeps on flickering and loading, but nothing happens


author: Thomas Schlegel
body: ok, what happens, if you try:

https://\<your-confluence-url\>.atlassian.net/wiki/spaces/\<space-key\>/pages/edit/12320769


author: Robert Tietze
body: this worked


author: Alana Fernando
body: hi [@Robert Tietze](/t5/user/viewprofilepage/user-id/1208659),

It might be a permission issue as mentioned in [answered similar community question](https://community.atlassian.com/t5/Confluence-questions/Page-Not-Found/qaq-p/356618).

you may want to verify for the page restrictions.

hope this helps :-)

comments: author: Robert Tietze
body: I checked that already, thanks anyway.


Tags: administration

confluence-cloud
Does editing/deleting a template impact pages based on the template?
Asked by Mohammed Iqbal:

We are following a template for all our documentation, now I want to change the overall design of these documents. Which is a better route for this? Creating a new template? Editing the existing one? If I were to edit the template, would the documents based on this template be modified automatically? Does deleting a template affect them?


Answers:
author: Alana Fernando
body: hi [@Mohammed Iqbal](/t5/user/viewprofilepage/user-id/1167909),

you may proceed with editing the existing template.

* already created documents will not affect by the change
* deleting the template will not affect any created confluence pages.

hope this info helps you ! :-)

comments: author: Mohammed Iqbal
body: It does help!

Thanks a ton!


author: Alana Fernando
body: :-) glad to help you.


author: Gilberto Almeida Neto
body: [@Alana Fernando](/t5/user/viewprofilepage/user-id/1134267) Hi Alana,  
I am currently struggling with the opposite problem of Mohammed and I wonder if you have a solution.  
I want my edits at the template to appear in all documents that previously used them.  
Is there a way to do it?  
Or an alternative to do it faster. I don't want to recreate all pages again every time I have to change a template.


author: Alana Fernando
body: hi [@Gilberto Almeida Neto](/t5/user/viewprofilepage/user-id/1475932) to the best of my knowledge this is not possible in default confluence. :(


author: Gilberto Almeida Neto
body: Thanks either way. I am trying to adapt with the Excerpts now.

They seem to work for what I want


author: Alana Fernando
body: if you are ting to use the exact same content in all the pages then yes. excerpts would be ideal.


Tags: template
Sometimes 404 when trying to download backup generated by script
Asked by Karl Schleifenbaum:

I've programmed a script that creates and downloads the JIRA and Confluence backups. JIRA works fine all the time but Confluence sometimes fails with "404 not found" when trying to open the download-URL.

In the backend it says:

**Export error**

Unexpected error during export has occurred  
But don't worry, we'll fix it for you!  
You just need to contact Atlassian support and paste in this error message, timestamp and your instance details.  
Timestamp: 2018-04-10T18:14:56.378

I don't know what causes that error, maybe you can help me?

Thanks in advance,

Karl


Answers:
author: Nazri Muhi
body: Hey Karl, could you access the logs? it looks like you're encountering issues during export and the backup file failed to generate. Is this for Confluence Server?

comments: author: Karl Schleifenbaum
body: Hi Nazri, it is for Confluence Cloud. Are there any logs? I couldn't find any. I take an undocumented approach so I reckon I might run into some unstable endpoints ... It's all very unsatisfying that atlassian doesn't have an API ready :(


author: Nazri Muhi
body: Hey Karl, If you're using Confluence Cloud, I would recommend that you open a support ticket with [Atlassian](https://support.atlassian.com/contact/) and provide them with the latest failure error message along with details such as how frequent your script runs for Confluence, how large is the last successful backup and when was the last successful run. Sorry cant help you much here but they should have access to the details that can pinpoint the cause of the problem.


author: Karl Schleifenbaum
body: I did exactly that and they told me to search help on these forums :D I'm trapped ... Maybe I should try again. Thanks for your help, Nazri, much appreciated.


author: Nazri Muhi
body: No problem, and also, just want to add that they are more willing to provide support if you were to re-frame the support request from "my script failed" (as they don't usually provide support for user scripts) to "my export failed" :)
?????????????????????????????
Asked by miki:

????????????

????????????????????????????????????????

???????????????????????????????????'Create from Template' ??????????????????????????????????????????????????????????????????????????????????????


Answers:
author: Ai Hirama
body: ???????????????????????????????

??????????????????????????????????????????????????????????

* [CONFCLOUD-29581 - Create from template macro should ask on which location the page will be created](https://jira.atlassian.com/browse/CONFCLOUD-29581)

???????????????????????????????????

??????????????????????????????????


Tags: language-ja
Please share me a document regarding upgradation of confluence 5.9 to 6.4 in Linux environment
Asked by kedar:

Please share me a document regarding upgradation of confluence 5.9 to 6.4 in Linux environment and while upgrading how we can give same access url


Answers:
author: Lauretha Rura
body: Hey [@kedar](/t5/user/viewprofilepage/user-id/1141837),

You can refer to our documentation below for the upgrade steps:

<https://confluence.atlassian.com/conf64/upgrading-confluence-936511823.html>

I'd also encourage you to read the [Upgrade notes](https://confluence.atlassian.com/doc/confluence-6-0-upgrade-notes-844235311.html), take a full backup, and test your upgrade in a non-production environment before upgrading your production site.

Hope this helps :)
JIRA Issues Macro returns "Data cannot be retrieved due to an unexpected error"
Asked by William Yeack:

Hi There,

My Confluence server is having the issue described here:

<https://jira.atlassian.com/browse/CONFSERVER-34793>

You can find my support zip here:

<https://www.dropbox.com/s/vq09b5315tcd33s/Confluence_support_2018-04-10-22-19-27.zip?dl=0>


Answers:
author: Suren Raj
body: Hi, William.

Thanks for providing us the support zip. Looking at the confluence support zip, we are seeing the following in the logs.
> Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target  
> at sun.security.validator.PKIXValidator.doBuild(Unknown Source)

Based on the error message, it seems like confluence is having some issue connecting to JIRA and also some SSL configuration issue.

According to the stack trace, it seems like the SSL certificate is not imported correctly. We have a documentation that related to this error and would suggest you have a look and try the resolution.

* <https://confluence.atlassian.com/kb/unable-to-connect-to-ssl-services-due-to-pkix-path-building-failed-779355358.html>

Let us know how it goes.

<br />

Cheers

Suren
Can't access ajax variable outside a request to a confluence page
Asked by Daniel Baron:

The code below doesn't change mytoggle from 0 to 1 which is what should happen according to[this SO link](https://stackoverflow.com/questions/16805306/jquery-return-ajax-result-into-outside-variable?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa). Is this somehow Confluence related?

```
    var mytoggle = 0;    $.ajax({      type: "PUT",      url: "/rest/api/content/" + page_id,      data: JSON.stringify(pageData),      contentType: "application/json; charset=utf-8",	success: function (data) {        mytoggle = 1;      },    });
    alert(mytoggle);  
```


Answers:
author: Steven F Behnke
body: Do NOT use async:false. So many of the comments on that stack overflow post explain why that's a terrible idea. And it's deprecated. That is the WRONG way to handle Ajax.

Just use the .success() callback method and pass 'data' to a function and call alert there.

comments: author: Daniel Baron
body: Thanks, I think it's working. Fyi that SO link presents async: false as the correct way to go, I just joined SO and don't have enough fake internet points to comment. Thanks again.


author: Steven F Behnke
body: Agreed, that post is not terribly clear, especially the first answer and it's comments. I have no stack overflow points either, so I also can't comment :/

Good luck!


author: Steven F Behnke
body: The stackoverflow post is pretty clear. This is the script, not Confluence.

1. You set mytoggle = 0
2. You **start** an ajax request
3. You use an 'alert' to display 'mytoggle'
4. The ajax request completes and sets mytoggle to 1

Ajax is asynchronous. You're calling 'alert()' before the ajax completes. Checkout the stackoverflow post again.

comments: author: Daniel Baron
body: Okay I've tried including async:false like below, which successfully changes mytoggle to 1 but I still can't get my_toggle to only cause a single alert. The code below will give an alert for every successful ajax request instead of just one. Trying to put the if (my_toggle == 1) statement later in the code gives a "my_toggle is not defined" error.

```
function thisFunction() { for (i = 0; i < inputs.length; i++) {  ...
  ...   $.get('/rest/api/content?spaceKey=EXPERTISE&title=' + skillName + '&expand=space,body.storage,version,container', function (data, status) { var pageData = data.results[0]; var existing_body = pageData.body.storage.value;  pageData.version.number += 1;        var page_id = pageData.id;        pageData.body.storage.value = pageData.body.storage.value + "hello world"; 
        var my_toggle = 0; $.ajax({          type: "PUT",   async: false,          url: "/rest/api/content/" + page_id,          data: JSON.stringify(pageData),          contentType: "application/json; charset=utf-8",           success: function() {
              my_toggle = 1;
          }        });
        if (my_toggle == 1){
          alert('Success!!');      });    }   }}
```


Tags: ajax

jql
How can I generate a table of content and use in-page links to pointing out people
Asked by Juan Carlos Castillo:

I need to generate a table of content and at the moment that I click on any of the topic on the table and in-page, I need to use this link to pointing out people to this new link, I need to generate an anchor for multiple topics in same page.


Answers:
author: AnnWorley
body: The [Table of Contents macro](https://confluence.atlassian.com/doc/table-of-contents-macro-182682099.html) will create an anchor for each heading that you can link to. Click the link in the TOC and then copy the URL from the browser address bar to obtain the link to that heading.
Can I get a Page from a tiny url in a user macro?
Asked by Damon Osgood:

In a Confluence user macro, I have access to the Tiny URL of a Confluence page. I'd like to get the ID of that Page, ultimately so I can iterate the descendents of that Page. So, something like:

```
#set($url='http://localhost/x/9_PXEg')
#set($page=$GET_PAGE($url))
#set($descendents=$pageManager.getDescendents($page))
## use $descendents...
```

I \*thought\* that the final six characters of the tiny url were the page id, Base64 encoded. But this does not work:

```
#set($url='http://localhost/x/9_PXEg')
#set($base64=$stringUtils.substringAfterLast($url, "/")) 
#set($idString=$generalUtil.base64Decode($base64))

$idString

```

The Base64 decoder cannot handle the six character string, even though it was generated by the same instance of Confluence. So it seems it's not simply a Base64 number.


Answers:
author: Damon Osgood
body: I found a solution. It's rather ugly, but it works. Suggestions for streamlining this would be very welcome!

```
#set($url="http://localhost/x/9_PXEg")

#set($tinyUrlClass=$action.class.forName('com.atlassian.confluence.pages.TinyUrl'))

#set($stringClass=$action.class.forName('java.lang.String'))

#set($constructor=$tinyUrlClass.getConstructor($stringClass))


#set($identifier=$stringUtils.substringAfterLast($url, "/"))

#set($tinyUrl=$constructor.newInstance($identifier)) 

#set($pageId=$tinyUrl.getPageId())

#set($page=$pageManager.getPage($pageId))

#set($descendents=$pageManager.getDescendents($page))

```

<br />


author: Stephen Deutsch
body: Hi Damon,

You're on the right track... they are base64 encoded, but they are encoded as a bytestring. You may have some luck referencing this answer:

<https://community.atlassian.com/t5/Confluence-questions/Is-there-a-way-to-update-tiny-links-when-migrating-a-confluence/qaq-p/713854>

or maybe if I have time later today I can try to reimplement in a user macro.


Tags: atl-adm

user-macro
Unable to view newly imported space in Confluence server.
Asked by Austin Wagner:

I'm following this process to create a copy of a confluence space:

1. Export space xml

2. Follow this guide to update the space key (<https://confluence.atlassian.com/confkb/how-to-copy-or-rename-a-space-in-confluence-169578.html>)

3. Upload the updated xml file.

The import is successful, but I'm unable to find the space in the space directory.

I can see in the space permissions section, under confluence administration, that the space has been created.

When I click manage permissions, I'm directed to a new page with a Page Not Found Error.

This leads me to believe that its a permissions issue but the space is a copy of a current space which I have administrative permissions to.

I've tried adding a new group to the space before import with no avail.

Any insight would be great appreciated.


Answers:
author: Suren Raj
body: Hi, Austin.

Can you please [rebuild the index from scratch](https://confluence.atlassian.com/display/CONFKB/How+to+rebuild+the+content+indexes+from+scratch+on+Confluence+server) and [rebuild the Ancestor Table](https://confluence.atlassian.com/display/DOC/Rebuilding+the+Ancestor+Table]) and check if the issue still persists?

Cheers  
Suren

comments: author: Austin Wagner
body: Hi Suren,

Thank you for the reply! I rebuilt the Ancestor Table and rebuilt the index from scratch with no success. The imported space is still visible under space permissions but inaccessible.

Thanks


author: Suren Raj
body: Hi, Austin.  

We would like to check the space permission, do you mind running the following query on your database and provide us with the output:

    SELECT sp.permid, sp.permtype, s.spacekey, s.spacename, sp.permgroupname, um.lower_usernameFROM SPACEPERMISSIONS spJOIN SPACES s ON sp.spaceid = s.spaceidLEFT JOIN user_mapping um ON sp.permusername = um.user_keyWHERE s.spacekey = '<SPACEKEY>';

Cheers

Suren Raj


author: Austin Wagner
body: Hi Suren,

Here is the output from the query. Apologies for the format, pasting the text file as a comment was too difficult to read. I've replaced the user names with users 1, 2, and 3. All 3 users are administrators.

Thanks again for your help,

![Row1.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/19592iDF752CD815BCF6B2/image-size/large?v=v2&px=999 "Row1.PNG")![Row43.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/19593i2CC6BFDBEDBBBD15/image-size/large?v=v2&px=999 "Row43.PNG")
Change Confluence login page...
Asked by uspdev:

I am currently running Confluence 6.6.3 on Windows Server 2016. I would like to change the login page message from "Log In" to "Login Using Active Directory Credentials" or something like that. I recall making the change on an earlier version of Confluence by extracting confluence-x.x.x.jar and editing ConfluenceActionSupport.properties if not mistaken.

How would one edit the login page on 6.6.3?

Thank you


Answers:
author: Lauretha Rura
body: Hi [@uspdev](/t5/user/viewprofilepage/user-id/743897),

The same goes with earlier version of Confluence, you'd also need to modify the ConfluenceActionSupport.properties file (after unpacking the confluence-6.6.3.jar file).

Please do take note that the following parameters are what we'd need to change to modify the login message:

- com.atlassian.confluence.user.actions.LoginAction.action.name

- login.name

In addition to that, you may also want to vote and watch for the improvement request below:

- [Allow administrators to customize the login page through the Confluence Administration Console](https://jira.atlassian.com/browse/CONFSERVER-44366)

Hope this helps :)


author: Suren Raj
body: Hi, Julian.

Please refer to the below link for more information about customizing login page:

* <https://confluence.atlassian.com/doc/customizing-the-login-page-163938553.html>

Let us know how it goes.

<br />

Cheers

Suren


Tags: atl-adm