youngmon/atlassian-qna huggingface dataset:
Why is AJS.$(window).scroll() not firing in Confluence (5.10.3)?
Asked by Nishaat Rajabali:

I am using HTML macro with below JS code. I want to display back-to-top icon on the right side but AJS.$(window).scroll() does not trigger after page is saved; hence, no back-to-top icon. However, the scroll triggers just fine in 'Preview' mode.

Any ideas as to why AJS.$(window).scroll() is not firing?

Also, how do you referecence external CCS? I added:  

\<link href="<https://confluence.barcapint.com/download/attachments/511785924/top-style.css?api=v2>" rel="stylesheet" title="default" type="text/css"\>\</link\>

but that doesn't work so instead I am injecting the CSS via JS - which works in in Preview mode. I tried CSS Macro to no avail. So how does one reference external CCS?

Thanks

NR

---------------------------------------------------------------------------------

\<a href="#0" class="cd-top"\>top\</a\>  
\<script \>  
var link = '\<link href="https://\*\*\*.com/download/attachments/511785924/top-style.css?api=v2" rel="stylesheet" title="default" type="text/css" /\>'

AJS.$(document).ready(function($){  
// browser window scroll (in pixels) after which the "back to top" link is shown  
var offset = 300,  
//browser window scroll (in pixels) after which the "back to top" link opacity is reduced  
offset_opacity = 1200,  
//duration of the top scrolling animation (in ms)  
scroll_top_duration = 700,  
//grab the "back to top" link  
$back_to_top = $('.cd-top');  

AJS.$(window).bind("load", function() {  
//alert("LOAD " + link );  
$('head').append(link );  

});  
//hide or show the "back to top" link  
AJS.$(window).scroll(function(){  
( AJS.$(window).scrollTop() \> offset ) ? $back_to_top.addClass('cd-is-visible') : $back_to_top.removeClass('cd-is-visible cd-fade-out');  
if( AJS.$(window).scrollTop() \> offset_opacity ) {  
$back_to_top.addClass('cd-fade-out');  
}  
});

//smooth scroll to top  
$back_to_top.on('click', function(event){  
event.preventDefault();  
$('body,html').animate({  
scrollTop: 0 ,  
}, scroll_top_duration  
);  
});

});  
\</script\>


Answers:
author: Melissa
body: I faced the same problem today and for me using:

AJS.$("#splitter-content").scroll(function () {...});

instead of

AJS.$(window).scroll(function(){..})

worked fine..


author: AnnWorley
body: CSS can be added globally at Confluence Admin\>(Look and Feel)\>Stylesheet and on the space level at Space Tools\>Look and Feel\>Stylesheet.

I am not sure why the scroll does not work when you publish - hoping someone else will chime in.
Is collaborative editing now live in Confluence cloud?
Asked by Helen Griffith:

Collaborative editing is suddenly enabled... Did a user activate it, or is it switched on for all cloud instances?


Answers:
author: Davin Studer
body: It is switched on for all instances of Cloud.

comments: author: Helen Griffith
body: Thanks David... It was really hard to find that information! I spent much of the day searching, trying to find out why Confluence looks funny :)


author: Ana Retamal
body: You can also read more about it at [Collaborative editing](https://confluence.atlassian.com/confcloud/collaborative-editing-828790374.html). If you don't have any more questions, you can accept the answer as valid :)

Have a nice day, Helen!


author: Helen Griffith
body: (Thanks Ana - this page is what confused me! It tells me to sign up to the beta program. But I guess the beta program is now closed since it's live for everyone?)


author: Sam Lucas
body: Hi [@Helen Griffith](/t5/user/viewprofilepage/user-id/674249) I am a product manager for confluence page creation. If you are interested an even more "live-editing" expereince, we just released our live-edit page creation early access program! [You can learn more and sign up to try live-edit pages here](https://community.atlassian.com/t5/Confluence-articles/Early-Access-Live-Edit-Pages-Create-and-edit-without-the-need-to/ba-p/2673118).
Can't access Confluence as network drive using WebDAV
Asked by Milo Chan:

We're having trouble accessing our Confluence wiki as a Windows network drive.

I've reviewed [this](https://confluence.atlassian.com/doc/configuring-a-webdav-client-for-confluence-148044.html) documentation, and the closest to success I've been able to get is by using this UNC path:

\\\\{server_name}\\DavWWWRoot\\plugins\\servlet\\confluence\\default\\

This path responds with a Windows Security prompt, but no combination of User name and Password works.

SSL is not enabled for our wiki, and there is no (non-default) context root configured. We are using Atlassian Crowd server for authentication, but I've tried logging in with both a Crowd-defined user and a local user.

Any ideas?


Answers:
author: AnnWorley
body: This article has some possible fixes as well as next steps for troubleshooting:

[Unable to authenticate while mapping a WebDAV client network drive in Confluence](https://confluence.atlassian.com/confkb/unable-to-authenticate-while-mapping-a-webdav-client-network-drive-in-confluence-200705136.html)

comments: author: Milo Chan
body: It worked.

I followed these instructions including updating the BasicAuthLevel registry parameter for Windows 7, then managed to connect to WebDAV by using "Map network drive..." in Windows Explorer. (Simply entering the UNC path in Windows Explorer did not work.)

Thank you!


Tags: crowd

webdav

wiki

windows
set a comment when editing a page over REST
Asked by Oliver Lipkau:

Hi.

I am using the REST API \`PUT /rest/api/content/{contentId}\`. To edit a page.  
However, I was unable to find an example on how to set the comment on the edit.

How can I do that?


Answers:
author: salim_doost
body: Ok, it works with recent versions. For the update page request, add a "message" property to "version", like this:

```
"version": {"number": latest_page_version + 1, "message": "Your message goes in here"}
```

comments: author: Michael Sonnleitner
body: thanks this is working (server edition)


author: Panos
body: I've been looking through the source code for 5.8.8 and it seems that through rest is not possible. I can dig up the action itself if you are interested (you can POST to the action), but I am convinced that /rest/api/content/{contentId} won't do what you want to do.

comments: author: Oliver Lipkau
body: Too bad.

It's frustrating that you could do that with SOAP (deprecated) but not with REST.

SOAP doc: [Remote Confluence Methods: Management](https://developer.atlassian.com/confdev/deprecated-apis/confluence-xml-rpc-and-soap-apis/remote-confluence-methods#RemoteConfluenceMethods-Management.1)

```
updatePage(String token, Page  page, PageUpdateOptions pageUpdateOptions)
```


author: salim_doost
body: Any updates on this?


author: Michael Sonnleitner
body: any updates?


author: Oliver Lipkau
body: Sorry. I should have been more specific.

I mean the comment about what you changed.

This field when saving the chnages:![ScreenShot_20170407_094644.png](https://community.atlassian.com/t5/image/serverpage/image-id/210iF57E49D3222F4F72/image-size/large?v=v2&px=999 "ScreenShot_20170407_094644.png")


author: Panos
body: I don't think you can do both an edit and set the comment in one call.


Tags: rest-api
What kinds of reports can I run in my Questions space?
Asked by Jonathan Beattie:

I am about to launch the usage of the Questions space across numerous teams in my organization. I'm curious as to what kinds of reports I can run on the data present in the Questions space. Specifically, I'm curious about the following:

* What users are asking questions (and how many questions are they asking)?
* What users are answering questions (how many questions are they answering, how many answers of theirs are accepted, etc)?
* How many questions are being asked (and answered) over a given time period?
* How many (and what) Questions remain unanswered over a given time period (either unanswered, or un-accepted)

I know that you can find some of this data for the 'top experts' but I would like to have reporting on **every user** of my Questions space.

Thank you for your assistance!


Answers:
author: Hermance NDounga
body: Hey Jonathan

I think this doc sum up more or less all the stats that you can do with Question for Confluence : <https://confluence.atlassian.com/questions/administer-questions-593035916.html>

comments: author: Jonathan Beattie
body: Hi Hermance, I did find that documentation and was aware of the limited reporting available, but was wondering if there is any better/more detailed reporting that is possible (the kinds of reporting that I reference in my Question description). Do you have any insight into Atlassian's ability to build this out?


author: Hermance NDounga
body: No I really don't know .. i found out this issue in jira.atlassian.com [CQ-1515](https://jira.atlassian.com/browse/CQ-1515?jql=project%20%3D%20CQ%20AND%20text%20~%20report) so i guess dev are aware of it but the status is "open" so ..


author: Ana Isabel de la Hoz Armenta
body: Hi Hermance, I can't access to the issue. Do you know if there are any updates? Thank you.


Tags: confluence-administration

questions-for-confluence

report
Confluence syncing ldap directory
Asked by DerivcoITServer:

Our ldap server is unable to sync successfully until recently.

We get the following error:

<br />

2017-04-04 09:47:01,376 ERROR \[Caesium-1-3\] \[atlassian.crowd.directory.DbCachingDirectoryPoller\] pollChanges Error occurred while refreshing the cache for directory \[ 10944516 \].  
org.springframework.dao.IncorrectResultSizeDataAccessException: query did not return a unique result: 2

How do we determine which is the duplicate ? Most of the dianostic queries we run returns no results :

<https://confluence.atlassian.com/confkb/synchronization-with-external-directory-fails-with-error-query-did-not-return-unique-result-757727378.html>

```
SELECT lower_username FROM user_mapping GROUP BY lower_username HAVING (COUNT(lower_username) > 1)
```

<https://confluence.atlassian.com/confkb/user-login-renders-query-did-not-return-a-unique-result-error-596181603.html>

```
SELECT external_id, lower_user_nameFROM cwd_userGROUP BY external_id, lower_user_nameHAVING ( COUNT(external_id) > 1)
```


Answers:
author: DerivcoITServer
body: I have resolved this. There was a duplicate user in the cwd_user table, which needed to be deleted. We also had to removed user from the cwd_mapping table.

comments: author: Raphael
body: You mean that there is a internal user in jira, and duplicated with the ldap sync, so you delete the internal user in jira, and everything become ok ?


Tags: crowd

directory

ldap
Link to file inside confluence from attachment
Asked by Jonatan Berg:

Hi!  

Lets say I have two excel documents attached to a Confluence page using the Attachment macro, Doc1 and Doc2.

<br />

Is it possible to link to Doc2 from inside Doc1 and open it using WebDav/GoEdit or any other addon that the Confluence site uses, even though I open the document on my computer using Microsoft Excel and not inside Confluence?


Answers:
author: AnnWorley
body: Please try linking to spreadsheet2 inside spreadsheet1 with a link like:

http://\<Confluence_Base_URL\>/pages/worddav/preview.action?fileName=Workbook1.xlsx\&pageId=1966113

You may find the page ID by editing the page - the page ID will be in the URL on the browser.
Attach dynamic html file from dfs share to confluence page
Asked by Mark Pless:

Hi Guys,

I've been scouring the internet for an answer to this, i am not a web developer and have never played around with this before so i am very green within confluence..

<br />

I have gotten the task of displaying a dynamic html page, that people will be editing / replacing, from a different server to a confluence page, the question is, how to do it..

<br />

I have tried looking at the external attachment macro and also HTML macro but i havent been able to get it to work...

If you guys could give me a helping hand that would be great :)   

Kind regards from Mark


Answers:
author: AnnWorley
body: The description of this add-on sounds like it suits your use case:

[HTML for Confluence](https://marketplace.atlassian.com/plugins/org.swift.confluence.html/server/overview)


Tags: attachment

html
How to export users from one Confluence 5.9.7 and import to a another Confluence 5.9.7
Asked by DevOps:

I want to export users from one Confluence 5.9.7 instance and import to another Confluence 5.9.7. and I don't have Export button . From what I've read, the Import/Export Button is available from version 5.10 above.

Thank you


Answers:
author: AnnWorley
body: Hi David,

I am curious about your project. I may be able to help if I understand the use case better.

* Are you merging two instances with disparate user bases via space import/export?
* Are the users all Internal Confluence users or do some originate in Crowd or LDAP?
* Do the users being imported have content on the destination instance that they need to be associated with?

Crowd has the ability to pull Confluence users directly from the Confluence database; after the users are in Crowd they could be synchronized over to Confluence.

There is not an export users btton in Confluence server. We have this workaround for exporting to CSV:

[How to Export User Data to CSV in Confluence](https://confluence.atlassian.com/confkb/how-to-export-user-data-to-csv-in-confluence-306350957.html)

But importing the users to the new instance will require some scripting, for example using the [CSV Command Line Interface (CLI)](https://bobswift.atlassian.net/wiki/spaces/CSVCLI)

comments: author: Mihaela Gosman
body: Hi Ann,

<br />

I have 2 Confluence instances 5.9.7 and I have to migrate Confluence1 instance to Confluence2 instance. This will imply to export all the spaces and all the users from first instance to second instance in order to merge all the spaces and users on the second instance.  
The first Confluence instance has 2 User Management directories:  
-Jira Server Directory (Attlasian Crowd Type )  
-Confluence internal Directory (Internal Type )

I've noticed that both Confluence Instances have External User Management set to OFF and I guess that in the past was used Crowd for user management, but at the moment I'm not aware of anything related to Crowd, I don't have any credentials or URL to access Crowd, and I don't think that exists anymore.  

The second Confluence instance has only one User management directory:  
-Confluence internal Directory (Internal Type )

At the moment the users that have to be imported have no content on the Destination Confluence instance. After I'll import all the spaces from first Confluence to second Confluence instance that will be the destination instance the imported users will be asociated with their spaces.

Until now, I managed to export the spaces into XML files and imported in the destination Confluence.  
Regarding users export I just found a plug in that will created the users on the destination Confluence based on the export CSV file form the first instance

<https://marketplace.atlassian.com/plugins/com.artemistech.confluence.plugins.bulkuserupload/server/overview>

Thank you,
How can I get notified on replies to my answers?
Asked by Maarten Cautreels:

I've had replies to several of my answers:

* <https://community.atlassian.com/t5/JIRA-questions/How-to-attach-files-to-jira-issues-using-JIRA-REST-module-in/qaq-p/458361/comment-id/191406#M191406>
* <https://community.atlassian.com/t5/Confluence-questions/Confluence-search-matched-snippets/qaq-p/458350/comment-id/77542#M77542>

But I did not get any email on these replies. (I did get the 'Answer Accepted' email for the second one.

Best,

Maarten


Answers:
author: Nic Brough -Adaptavist-
body: Same problem here.  

A lot of questions need discussions before they can be answered, and we have no way of knowing when discussions are being made. Email or RSS would solve it for me, but there needs to be proper follow-up notifications for participants, or the questions are just going to hang, unanswered.


Tags: community

feedback
Confluence search - matched snippets
Asked by Shai Deljo:

Is there a way in the Confluebce search API to get back only the snippets of text from the document that matched the query? i.e. instead of the entire body (all the document) to get shorter text based on the match with the query terms?


Answers:
author: Maarten Cautreels
body: Hi Shai,

While using the Confluence REST API seems to be more of a developer matter I'd like to point you to the new [Developer Community](https://community.developer.atlassian.com) that Atlassian recently launched.

To not leave you empty handed I think you can use the *excerpt* property of the response of your search query. This will give you an excerpt and mark the search term(s).

For example when I do a search with *text\~'collaboration'*the API will return an excerpt like this:

```
"excerpt": "Interview Info Company Berlingske Media Department Consumer Sales Products SalesForce (heeft veel @@@hl@@@collaboration@@@endhl@@@ mogelijkheden) Google Drive Gmail Google &hellip;  Voordien in email marketing en hotel manager Veel @@@hl@@@collaboration@@@endhl@@@/partnering met Ad Sales Problems Observed Problems Observed Below is a list of the problems we",
```

As you can see the word collaboration is marked with *@@@hl@@@* and *@@@endhl@@@.*

You can choose the excerpt strategy using the excerpt request param as documented in the [Confluence REST API Docs](https://docs.atlassian.com/atlassian-confluence/REST/latest-server/#search-search).

Best,

Maarten

comments: author: Shai Deljo
body: Thanks! Appreciate the tip.


Tags: search
Can I copy a Space and rename it
Asked by Gina Stradis:


Answers:
author: Ana Retamal
body: Hi Gina, copying spaces within Confluence it's not possible at the moment. For some suggestions and workarounds, I recommend you to visit How to copy or rename a space in Confluence. You can also use a third party plugin like the one Thomas suggested.

Hope this helps!

comments: author: Kim Hoang
body: Hi Ana,

Copy and Paste is one of the most requested feature in an CMS.

When do you think this feature will be implemented for Cloud?

Where is the feature request ticket in Jira so I can vote for this request?

Thanks in advance.


author: Thomas B
body: Try this plug in: <https://marketplace.atlassian.com/plugins/ac-copy-space/cloud/reviews>


Tags: cloud

confluence-cloud
draw.io add own template and custom styles
Asked by Stefan Bogdan Cimpeanu:

Hello,

How do you add a custom template to draw.io and make it available to everyone n the Confluence instance?

Also I'll need to add or at least edit some styles to be accessible from the styles menu.

Any hints on this please?

Regards,

Bogdan


Answers:
author: David Benson _draw_io_
body: [This is now possible in 6.5.0](https://desk.draw.io/solution/articles/16000057705-how-to-define-custom-templates-for-draw-io-in-confluence-server)


author: David Benson _draw_io_
body: This isn't possible currently.


Tags: confluence-administration

draw.io
synchrony issue for client browser using proxy server
Asked by Ming Ho:

we are on confluence 6.0.6. synchrony appears to be working if client browser doens't use proxy server. some of our windows users in the company have proxy server setup for their browsers. They usually get an error about "[Loading the editor's taking longer than usual](https://answers.atlassian.com/questions/43907783/confluence-6.0.1-loading-the-editors-taking-longer-than-usual)..." when editing a page. i have tried both apache and nginx; switched in-between ws:synchrony and syncrhony-proxy. No luck. has anybody run into this before?


Answers:
author: Phil Jackson
body: I ran into the same errors, and also errors where randomly, users couldn't save documents because they recieved errors that the server couldn't be found. I was using iis as my proxy server. If I tested locally it worked perfectly, just not from outside the network. It may be best to turn it off. Apparently, there appears to be a complete fix in the 6.1 version, but I have yet to test it.
What's the difference between confluence v4.1.6 to confluence v6
Asked by Eda Prasad:

What's the difference between confluence v4.1.6 to confluence v6 in SERVER?


Answers:
author: Nic Brough -Adaptavist-
body: Lots. Best described in the release notes at <https://confluence.atlassian.com/doc/confluence-release-notes-327.html>

comments: author: Eda Prasad
body: Thank you, Nic


author: Pavel Potcheptsov
body: Main difference is that since version 6 32-bit installer isn't supported.


Tags: confluence-administration
Viewing only restricted page(s)
Asked by Gerald Hochegger:

I'm having big problems with the new *page restrictions form*introduced in confluence 5.9

Before you have seperate

* Restrict Viewing
* Restrict Editing

permissions.

Now we have

* No restriction
* Editing restricted
* Viewing and Editing restricted

When selecting "Viewing and Editing" you are automatically added and you can't remove yourself.

This has the effect this page is now only editable by you, if you don't add other users also -and I don't want to manually add all other possible users !

Before 5.9 if an additional user was added to the space, he could automatically edit all pages he was able to view (given there are no additional restrictions on a page)

Now I've to search all "Viewing and Editing" restricted pages and manually add this new user - this is a major downside for me.

How can I bring back the better "before 5.9" behavior - with separately Restrict Viewing and Restrict Editing options ?

Thanks


Answers:
author: Davin Studer
body: One thing that might help is generally speaking restrictions should be given to groups. Sure, you can add individual users, but it is WAY easier to manage as groups.


author: Gerald Hochegger
body: Yes groups are way to go.

In the meantime I figured out how "view" permissions are displayed in the new restriction form:

I added a "view" group restriction with Bob Swifts confluence cli and checked the restriction display in confluence - I (as the user who executed the cli) and the group both were added as "Can view and edit"

And this is correct - the group has editing permission (only viewing was restricted)

So there is no difference to the before 5.9 behavior - only naming is somewhat misleading.

If I want to restrict viewing of a page and subpages to group, which has no editing capabilities in the space, I select the group in "Viewing and Editing restricted" and this sets only a view restriction on the top level page.

The effect is the same - cli or gui - subpages are not accessible to an outside user.

Still I found the pre 5.9 notation easier to understand.

Greetings

comments: author: Gerald Hochegger
body: And there is a difference between cli an gui.

cli sets only a view permission a restricted page

* "View","group"

If I store the restrictions within the confluence gui - I get four permissions

* "View","group"
* "View","user"
* "Edit","group"
* "Edit","user"

The last three permission are not necessary - I want the pre 5.9 behavior back.

Greetings


Tags: confluence-administration
How to add content in Excel that turns into a status macro in Confluence
Asked by Milo Test:

I have an Excel spreadsheet with which I have to update a Confluence page every week. One column shows the status of the row and currently I have to manually change that cell to the Status macro.

Is there some code I can enter into the Excel cell that will automatically turn into a Status macro? Or is there a way to do a find and replace, replacing found text with the Status macro?


Answers:
author: Robert Ortner
body: I don?t think you will find a way - I was not able to solve the same problem, because the excel plugin in confluence is not able to show excel sheets if you have macros running in your sheet ;-(


Tags: cloud

confluence-cloud

ms-excel

status-macro