youngmon/atlassian-qna huggingface dataset:
Is there a way to have checkboxes in a wiki page without it modifying the page?
Asked by Ned Batchelder:

I want to have a checklist in a wiki page, but readers keep clicking the boxes, which modifies the wiki page. I don't want that. I want them to look like checkboxes, but not actually be an active element on the page. Is there a way to do that?


Answers:
author: Shannon S
body: Hi Ned,

In that case, you would have to insert images of checkboxes instead of actually using the macro.

Let us know if you have any questions about that.

Kind Regards,  
Shannon
How to avoid bad URLs getting indexed by Google?
Asked by Matthias Gidda:

With Confluence Server, Google indexes some bad URLs which shouldn't be visibile to users (like https://myconfluencesite/plugins/recently-updated/).

How can I avoid that?  
Is the only solution to try and use a robots.txt and disallow /plugins/?  

If so, how do you add a robots.txt to a Confluence Server install?  

Any help would be appreciated, thanks!


Answers:
author: AnnWorley
body: Hi Matthias,

Please see [Prevent Search Engine Indexing Using Robots.txt](https://confluence.atlassian.com/display/DISC/Prevent+Search+Engine+Indexing+Using+Robots.txt). I look forward to any follow up questions and to hearing whether it works for your instance.

Thanks,

Ann

comments: author: Matthias Gidda
body: Hi Ann,

thanks for your reply and the link. It says that if I can't upload a robots.txt file (which is the case for my setup, unfortunately), then I should use the meta tag. But as I understand it, the meta tag doesn't let me block a URL like https://myconfluencesite/plugins/recently-updated/ from getting indexed, right? Or how would a meta tag look like that does that?  

Thanks,

Matthias


author: Matthias Gidda
body: Hi Ann, do you have an update for me?  
Thanks,

Matthias


author: AnnWorley
body: My understanding is that you can block your entire instance from Google's indexing: [Block search indexing with 'noindex'](https://support.google.com/webmasters/answer/93710?hl=en). Here are the examples of what the meta tag would look like, which you would paste in under Confluence Admin\>Custom HTML\>At the end of the head:
>
> ### \<meta\> tag {#toc-hId-1565389479}
>
> To prevent *most search engine web crawlers* from indexing a page on your site, place the following meta tag into the `<head>` section of your page:
>
>     <meta name="robots" content="noindex">
>
> To prevent *only Google web crawlers* from indexing a page:
>
>     <meta name="googlebot" content="noindex">
>
> You should be aware that some search engine web crawlers might interpret the `noindex` directive differently. As a result, it is possible that your page might still appear in results from other search engines.
how can I retrieve the name of the space i'm in (for a macro)
Asked by le tu:

Hi,

I'm writing a macro and I need it to save the name of the space that the macro was inserted in, can anyone help with this? is there a system variable for the space name?

Thanks,

-lee.


Answers:
author: Thomas Schlegel
body: Hi Lee,

you get the name of the current space with: $space.getName()

comments: author: le tu
body: could you please elaborate? when I've added this to my macro it didn't work, here's the relevant part of my code (it's inside of an HTML macro):

```
<script>var title;var url;var space_name;

var func = function() {  console.log('func loaded');  AJS.toInit(function() {    console.log('toInit loaded');    AJS.$(document).ready(function() {      console.log('ready loaded');      title=AJS.params.pageTitle      console.log(title);     
      space_name=$space.getName();      console.log(space_name);

in the above 2 lines I'm getting the following error:
![error.png](https://community.atlassian.com/t5/image/serverpage/image-id/4979i9D566FAD66EEE831/image-size/large?v=v2&px=999 "error.png")
What am I missing? Should I include somekind of library?..can you please guide me further on how to use the $space in my macro..?
And could you guide me on where to check these kinds of stuff for further times?

Thanks!!!
```


author: Thomas Schlegel
body: Ah, you didn't mention that you want to get the space name in javascript. There you get it like this:

AJS.Meta.get('space-name')

To make sure, you get the right name, try an alert first:

alert(AJS.Meta.get('space-name'));


author: le tu
body: Hey Thomas Thanks a lot!!

How did you know where to find this solution?

I've looked on google and couldn't reach any useful information...can you please explain how should I find solutions to this kind of questions in the future?...I couldn't find any good documentation for libraries that work with Atlassian or stuff like that...

Thanks,

-Lee


author: Thomas Schlegel
body: You're welcome, Lee!

How to find a solution? There's no simple answer for this question. I am working as an administrator for 12 years now with Atlassian's products and try to learn from various sources, so experience is an important thing. A great source is this community. You can learn by reading answers to questions you do not even have at the moment just for learning. Here you find answers to a lot of questions, although they are sometimes not so easy to find. Communicating with other users, developers and admins in this community is always a good idea. Don't hesitate, ask your questions. With most questions, there's someone who can help you. And the next time, you already know the answer. And answer other's people questions... I am doing that for years now :-)

Another great source is Atlassian's developer site:

<https://developer.atlassian.com/confdev>

There you find tutorials for developing plugins and a lot of other useful things.


author: le tu
body: 10x:)


Tags: html

macro
@mention macro shows an obsolete user name
Asked by Ulrike Begert:

After correcting the user name in our active directory the correction is not visible in the @mention macro. All details in the user profile in confluence are corrected and up to date. Only the @mention macro don't work. Is there a way to refresh an internal list or something similar? Restarting the Server doesn't work.


Answers:
author: Ulrike Begert
body: Problem was solved by <https://community.atlassian.com/t5/Confluence-questions/Change-user-mention-display-name/qaq-p/24166>
separating internal / external users
Asked by jonker@hitt.nl:

Hi

Currently we have confluence server for intenal and external data. This prefectly mananged by setting permission on space. Customers and employees can use Confluence and can access the data based on the permission.

However, the company requires anow dditional security for intenal data/users. A user still can have access to confluence with username / password as long as they are on the local network, but need 2 way authentication when they are outside the office.

The 2 way authenitication is possible by setting up a VPN connection to the office network and can use Confluence. But how can I prevent that the account can not access Confluence directly from the internet like the customers can do.

Main idea behind it, when user credentials of our employees are compromised, everybody can have access to our internal data.

I was thinking to install 2 confluence servers, a server for our customers and an internal server. Customers have access to the public server only and internal users have an internal server.

But in this case the data of the external server needs to be transparent in the internal server (e.g. as a space). So search functionality runs over two servers. Internal users can still see the public information and do not have to login on two different servers

Has somebody any idea how to do this?

Thanks in advance for your support


Answers:
author: Nic Brough -Adaptavist-
body: Two servers won't solve this problem because there is no cross-server search. They are separate systems.

You should do this on a network level, not with the applications. Talk to your network teams about how incoming connections are routed and how best to authenticate people coming in via the different routes.
Meta data in new confluence UI
Asked by Rob Buijs:

In the dearly beloved 'old' confluence UI every page has a collaboration assisting information line below the title of the page.

"Created by XX, last modified on YY"

This is useful information. Who created the page, and how stale is the information in the page. It places the page in context.

In the new confluence UI this line is redesigned and now it takes an incredible amount of space on the page.

![Schermafbeelding 2017-08-21 om 10.19.00.png](/t5/image/serverpage/image-id/4956i3D222C2541272902/image-dimensions/428x151?v=v2 "Schermafbeelding 2017-08-21 om 10.19.00.png")

Can this be fixed? Also, the line is gone from the homepage of a space, along with comments.


Answers:
author: Shannon S
body: Hi Rob,

1. It is not possible to modify the look of the text showing created by and last modified dates. The current formatting you see is how it will look on all pages. You can submit your feedback regarding this to the developers from the menu on the bottom left-hand side when you click on your avatar photo.
2. The line won't be seen on the default overview page, but you can click ... \> Page Information to view those details.
3. I've created a feature request to be able to enable comments on the default overview page: [CONFCLOUD-56967](https://jira.atlassian.com/browse/CONFCLOUD-56967). It's been disabled from that page but I'm requesting there the ability to selectively enable it. If you were to set another page as the space home page it does appear you will be able to have comments there.

Let me know if you have any further questions about this!

Kind Regards,  
Shannon
Set order of the page tree on the sidebar when creating content through REST API.
Asked by Bartosz Jamroz:

Hi,

Is there a way to pass desired order of the page tree which is visible on the sidebar when creating content through the REST API?

Right now we are generating our documentation from the code and using REST API to publish it to confluence. The process works but the page tree for the documentation is sorted alphabetically which is not what we want since we'd like to have a certain order of pages shown to guide the user through topics.


Answers:
author: Fabio Racobaldo _Herzum_
body: Hi [@Bartosz Jamroz](/t5/user/viewprofilepage/user-id/1146457) ,

unfortunately there is not a specific REST API for that.

Fabio
No user exists with the user key
Asked by Danske Bank Atlassian Support:

Hello,

When a user tries to login to Confluence, an error is thrown:

java.lang.RuntimeException: javax.servlet.ServletException: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getConfluenceResourceTags' in class com.atlassian.confluence.setup.velocity.VelocityFriendlyPageBuilderService threw exception java.lang.IllegalArgumentException: **No user exists with the user key 8ada960257425b3001578f655756008a** at /decorators/includes/header.vm\[line 84, column 20\]

The user exists in the DB with this key. Any ideas how to fix this?  

Tried to flush:  
User Information By Username  
User keys (by username)  
User Login Information  
User Property Set References  
Username to Id Mappings  


Answers:
author: AnnWorley
body: I understand you are seeing an error when a user tries to log in. You have checked in the database for the user key and flushed the database caches under Confluence Admin\>Cache Management.

Please let me know:

* Is this a new installation, a test instance copied from Production or a Production instance?
* Is the error you posted from the log or from the browser when the user tries to log in?
* Does it only happen for one user, if so, is that the same user that is associated with the user key?
* What table did you find the user key in?

To support user renaming, the user_mapping table associates users with user keys and the keys are then used elsewhere in the database to identify users.

One way to chase down which table Confluence is querying when it fails to find the expected user key is to turn on detailed sql logging and see what is logged when the user tries to log in. Please see [Enabling Detailed SQL Logging](https://confluence.atlassian.com/doc/enabling-detailed-sql-logging-179030.html).

The log to check is \<confluence_home\>/logs/atlassian-confluence.log. (The \<confluence_home\> directory is the path defined in the following file: \<confluence_install\>/confluence/WEB-INF/classes/confluence-init.properties)

comments: author: Danske Bank Atlassian Support
body: Hello,  

Restart helped.  

Thank you for the support :)
PDF Stylesheet - Not saving
Asked by Rilwan Ahmed:

As the "Export to PDF" is not exporting the colors in "Status" macro, I tried adding few lines into General Configuration -\> PDF stylesheet. While saving the page, I am getting below error.

++**Page:**++ \<ServerName\> /admin/flyingpdf/editpdfstyleconfig.action  

++**CSS lines trying to be added:**++

.aui-lozenge-complete{  
background-color: blue;   
opacity: 0.5;  
}   

.aui-lozenge-success{  
background-color: green;   
opacity: 0.5; }   

.aui-lozenge-error{  
background-color: red;   
opacity: 0.5;  
}   

.aui-lozenge-current{  
background-color: yellow;   
opacity: 0.5;  
}

++**Error While saving page:**++

### Cause {#toc-hId-1564646586}

java.lang.IllegalArgumentException: java.lang.ClassCastException@2aeb9add  
at sun.reflect.GeneratedMethodAccessor5294.invoke(Unknown Source)

#### Stack Trace:\[hide\] {#toc-hId--1184023880}

```
java.lang.IllegalArgumentException: java.lang.ClassCastException@2aeb9add	at sun.reflect.GeneratedMethodAccessor5294.invoke(Unknown Source)	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)	at java.lang.reflect.Method.invoke(Method.java:497)	at com.opensymphony.xwork.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:302)	at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:170)	at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35)	at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)	at com.atlassian.confluence.core.ConfluenceWorkflowInterceptor.intercept(ConfluenceWorkflowInterceptor.java:58)
```


Answers:
author: AnnWorley
body: I am not sure why it is not saving for you, I saved your CSS on my test instance so it's nothing in the content:

![Screen Shot 2017-08-24 at 2.42.59 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/5187iD1AD001705199D84/image-dimensions/267x339?v=v2 "Screen Shot 2017-08-24 at 2.42.59 PM.png")

Please let me know:

* What version of Confluence are you running?
* What is the full stack trace, starting with the date stamp, in the atlassian.confluence.log when the error appears in the browser?

The atlassian.confluence.log is in the \<confluence_home\>/logs directory. (The \<confluence_home\> directory is the path defined in the following file: \<confluence_install\>/confluence/WEB-INF/classes/confluence-init.properties)


Tags: export

pdf

status
can Updating existing database(Oracle 11g) to UTF-8
Asked by hong guo:

hi?

I Just met a difficult problem.My jira and wiki shared a database which is Oracle 11g,the database character is GBK 32.However,when I transfer the data from the old 11g database to a new database which is Oracle 12c. It shows that some column was incorrupted because the character in 11g show with 2 bytes,but shows with 3bytes in 12c.

How to deal with the problem above,I just read the article"<https://confluence.atlassian.com/doc/configuring-database-character-encoding-177698.html",it> says can update the database character to UTF-8 directly.Can i do it in my Oracle database?

look forward to your reply!

Wendy


Answers:
author: Shannon S
body: Hi Wendy,

The equivalent for Oracle is AL32UFT8. I found the following post in the Oracle community to change a database to this encoding:

[Oracle11g: how I change character set to AL32UTF8?](https://community.oracle.com/message/3917717)

Can you have a look at that page and see if you're able to change it using those methods?

Kind Regards,  
Shannon


Tags: jira
how to hide a link of a page in panel of confluence sidebar
Asked by Servicedesk:

Hi,  

we've configured a panel in sidebar on the dashboard with links to some spaces.  
The problem is that some users haven't got the permission to view all spaces and this links will not shown as links and there not accessible for unauthorized users.  

How can we hide this links when these are not accessible for some users?  

We've used \[spacekey:pagetitle\] to create the links.


Answers:
author: AnnWorley
body: I tested on Confluence 6.3.3 and reproduced what I understand to be the issue. For a user without access to the page being referenced in the link, the wiki markup shows in the sidebar:

![Screen Shot 2017-08-22 at 4.59.42 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/5053i575F2AFABACB16D3/image-dimensions/289x521?v=v2 "Screen Shot 2017-08-22 at 4.59.42 PM.png")

For the user who can see the page in the link, there are two links, one that I added with wiki markup as you are doing and one I added using the Space Tools\>Configure Sidebar. You can see from the screenshot above that the one I added using the Configure Sidebar option automatically disappeared for the user who did not have permission.

You can see below how the sidebar looks when you do have permission (both links are there):

![Screen Shot 2017-08-22 at 5.01.09 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/5052i143FDA8E319C2D46/image-dimensions/266x479?v=v2 "Screen Shot 2017-08-22 at 5.01.09 PM.png")

Will it work for you to add the links as described in [Configure the Sidebar](https://confluence.atlassian.com/doc/configure-the-sidebar-317194694.html)?

comments: author: Servicedesk
body: Hi Ann,

thank you for the answer. This could be one solution if it will be added as space shortcut.

But we have a panel configured like the following:

{panel}\*Departments\*  

\[spacekey:pagetitle\]  
\[spacekey:pagetitle\]  
\[spacekey:pagetitle\]  
\[spacekey:pagetitle\]  
\[spacekey:pagetitle\]  
\[spacekey:pagetitle\]  
\[spacekey:pagetitle\]  
\[spacekey:pagetitle\]  
\[spacekey:pagetitle\]  
\[spacekey:pagetitle\]  
\[spacekey:pagetitle\]  
{panel}

Two of them are not visible to all users because of permissions.

It seems that we have to find another solution for that.

Thank you


Tags: confluence-server
HTTPS
Asked by Rafal Niznik:

Hi All

Confluence is new to me but currently I want to setup SSL

I follow all instruction I found but still have some issues running over SSL

Can anyone advice and provide basic step-by-step guide?

I'm runnning confluence under Debian box

Regards

Raf


Answers:
author: noamdah
body: Run on application server:

openssl genrsa -out confKey.key 2048 -sha256

<br />

openssl req -new -key confKey.key -out confReq.csr

Send confReq.csr to CA

Take caReply.cer to server

openssl pkcs12 -export -out key.pfx -inkey confKey.key -in caReply.cer

<br />

keytool -importkeystore -srckeystore key.pfx -srcstoretype pkcs12 -destkeystore myKey.jks -deststoretype JKS

<br />

On server.xml file:

\<Connector port="8443" maxHttpHeaderSize="8192"  
maxThreads="150" minSpareThreads="25"  
protocol="org.apache.coyote.http11.Http11NioProtocol"  
enableLookups="false" disableUploadTimeout="true"  
acceptCount="100" scheme="https" secure="true"  
clientAuth="false" sslProtocols="TLSv1,TLSv1.1,TLSv1.2" sslEnabledProtocols="TLSv1,TLSv1.1,TLSv1.2" SSLEnabled="true"  
URIEncoding="UTF-8" keystorePass="changeit" keystoreFile="/path/to/myKey.jks"/\>

<br />

Restart confluence

Change base url


author: Nic Brough -Adaptavist-
body: You'll need to decide on what route you want to take first. You can either try to run Confluence's Tomcat with SSL, or take the recommended route of setting up a simple reverse proxy that handles all the SSL stuff. (There are other routes, but these are more than a little unusual, and I'm only really familiar with the 97% of cases that go with a proxy).

Do you have a preference? If so, and it's a proxy, which web server would you choose as the proxy? (Nginx, Apache, Lighttpd etc)

comments: author: Rafal Niznik
body: currently I use Sophos XG firewall that has option to protect webservers but not really sure hot to set this up


author: Nic Brough -Adaptavist-
body: That's nothing to do with SSL or proxies. Although you may have to configure it to allow traffic on the port you want to run on.


Tags: ssl
Hide edits from activity stream
Asked by Andrew Miller:

I'm a Confluence user and want to privately create and edit pages in my personal space. I can restrict view / edit access to my pages, but any edits I make to these private pages still seem appear in my site's global activity stream. I want to be able to make private notes / documents without everyone on my team being notified of the page title and time \& date of every edit.

Is there any way to exclude specific content from the activity stream? Note that I'm not an administrator and can't alter the settings of the activity stream itself.


Answers:
author: Reinhard Piltz
body: "but any edits I make to these private pages still seem appear in my site's global activity stream."

You can see the entries, of course. Already tried with another account without right in your private room?


Tags: activity-stream

permission
HQL query to search by ContentProperty
Asked by Christopher Klinge:

Hi,

I'm working on a Confluence Server plugin using CustomContentEntityObjects as outlined in <https://bitbucket.org/resah/confluence-custom-content-example>. Creating and storing the entities works like a charm and I can use HQL to fetch them using several different fields of CustomContentEntityObject (e.g. title or body).

However, I cannot for the life of me, figure out how to find objects using ContentProperties. As an example I have this code when setting the property:

```
contentEntityObject.getProperties().setLongProperty(PAGE_ID_KEY, page.getId());
// ...
customContentManager.saveContentEntity(contentEntityObject, SAVE_CONTEXT);
```

How can I retrieve this object using the page id?

Kind regards,  
Christopher


Answers:
author: Sahal Saad
body: Hi,

I belive you can find the Content properties using [getLongProperty](https://docs.atlassian.com/confluence/5.9.2/com/atlassian/confluence/content/ContentProperties.html#getLongProperty-java.lang.String-long-):

```
contentEntityObject.getProperties().getLongProperty(String?name, long?defaultValue) 
```

comments: author: Christopher Klinge
body: I knew that already. My goal was to retrieve CustomContentEntityObjects using HQL without having to do additional filtering in Java. See my answer to this question for a solution.

Well, scratch that. The language filter does not permit submitting my source code.


Tags: app

confluence-app

confluence-development

database

developer

java