youngmon/atlassian-qna huggingface dataset:
Question about XSS protection for plugins
Asked by Daisuke Niwa:

Hi there,

I have a question about "Anti XSS module for plugins" within the security configuration screen of Confluence admin console.

One customer reported that when they enable this, the amount of connection between Confluence and DB increased dramatically.

Does it correspond to XSSSecurityHeader added to xwork?

Also, anyone happens to know how this Anti XSS module works?

Regards,

Daisuke Niwa


Answers:
author: VitalyA
body: This is what you're looking for: <https://developer.atlassian.com/display/CONFDEV/Enabling+XSS+Protection+in+Plugins>

XSSSecurityHeader serves a different purpose and was introduced only recently.
Image attached in confluence on clicking to zoom gives the error"The requested content is not currently available.Please try again later".
Asked by sap:

We recently upgraded to Confluence 4.3.3 and have come across one of these problems.

Attached a jpeg/png image to a page in a space.Added the image on the page for display as an image macro.

The image is shown on the page after saving.However if we click on the image for an enlarged view,we get a pop up message "The requested content is not currently available.Please try again later".This behaviour is only seen in IE8 and cannot be replicated in Firefox.

Has anyone come across such an issue and if yes,is there a workaround for this.


Answers:
author: LuizA
body: Hello Sandeep,

It's a little weird this behaviour, just per the description it's a little hard to pinpoint a root cause for this, and I didn't see this before with other customers. So to better help you I would suggest to raise a support ticket at our [support.atlassian.com](http://support.atlassian.com) and so we can perform a better investigation to find the root cause of this problem.

I hope this helps.

Cheers,

LJ.

comments: author: sap
body: Hi Lj,

Thanks for your reply.I redited the image and saved it.Its now getting shown.But the problem is valid.Since i saw it again in the confluence 4.3.5 release notes with one of the fixed tickets.please go to the below link

<https://jira.atlassian.com/browse/CONF-27224>

In this ticket we can see an attachment.When i click it i again get the error i mentioned above.Please find the attached image.![](../../upfiles/Error.JPG)

Please let me know if you have a clue as to why this could happen.I am pretty confused.

Regards,

Sandeep
How do I add Jira to my on-demand version of Confluence?
Asked by Richard S:

I have an on-demand version of Confluence that the company is using and would like to add JIRA into the mix too, however when I go to the configure option to add JIRA licenses, there is no way for me to do it??

Instead of creating another account / instance - how do I configure my site to include JIRA too?


Answers:
author: Nic Brough -Adaptavist-
body: You should be able to buy licenses inside the account you are using for OnDemand Confluence. If you're struggling with it, get in touch with [sales-at-atlassian.com](http://sales-at-atlassian.com)

comments: author: Richard S
body: That is what I am asking - there is no way for me to add JIRA to what I already have (Confluence).

I can create a new instance, but I can't add JIRA under the site I already hacve for Confluence.


author: Dave
body: Hi Steve,

It's actually not so simple! Because JIRA holds the master record for user information when you have both products, you can't just add it. You need to backup your current Confluence spaces locally, have Atlassian destroy that instance, and recreate it with both products. [Check out this knowledge base article](https://confluence.atlassian.com/display/ONDEMANDKB/How+to+Add+JIRA+to+a+Confluence+OnDemand) for details.

Thanks,

-dave


author: Jacob Solotaroff
body: For anyone still trying to figure this out...

Go to [my.atlassian.com](http://my.atlassian.com)

Choose "Configure"


Tags: cloud

jira
IIS Redirect Confluence (URL port removal) - Page Not Found error
Asked by Nathan K_ Campbell - 817_966_5232:

I have followed the instructions here:

<https://confluence.atlassian.com/display/JIRA052/Integrating+JIRA+with+IIS>

but for Confluence did as Tino suggests here: [https://answers.atlassian.com/questions/28873/configure-iis-to-forward-requests-to-confluence-along-with-jira-subdomain?page=1#29689](/questions/28873/configure-iis-to-forward-requests-to-confluence-along-with-jira-subdomain?page=1#29689)

It worked just great for JIRA andConfluence seems to function (all of the administrative pages work fine) but if I try to go to an existing content page I get a 404 Page Not Found error unless I add the port back into the URL. I have tried re-indexing to no avail. If I create a new page the url without the port works just fine.


Answers:
author: Ingo Schock
body: Check out

<https://confluence.atlassian.com/display/CONFKB/Page+Or+Blog+Titles+with+Spaces+Do+Not+Work+with+IIS>


author: PauloP
body: Hi Nathan

Since it works for a new page, it makes me thing that the error is related to the old pages content. Did you double check that?

Perhaps there's a URL tag which is addressing to a wrong place. Anyway, raise a new support ticket in case of further assistance.

Cheers,

Paulo Renato

comments: author: Nathan K_ Campbell - 817_966_5232
body: Hi Paulo,

Thanks, I checked the content as best I could (even checked out the Content \& Links table in the database) but couldn't really find anything. Any thoughts on where I should look further?


Tags: iis

redirect
Error on space import
Asked by Richard Whiffen:

Need help getting around this error on import:

Import failed. Check your server logs for more information. Hibernate operation: could not insert: com.atlassian.confluence.labels.Label#7930192; SQL ; Duplicate entry '7930192' for key 'PRIMARY'; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '7930192' for key 'PRIMARY'

Steps taken to get into this mess:

We imported a space from a space-export file, 100% successful.

The export used was determined to be old and contained outdated pages.

Space was deleted (this takes away longer than I thought it would...)

New export version was copied to server into the confluence-data/restore/ directory

Restore was attempted again via the admin interface, but fails at 44% with Unique Constraint error.

Read the following KB article: <https://confluence.atlassian.com/display/CONFKB/Unable+to+Import+Space+due+to+Primary+Key+Constraint>

Which seems to address the problem. When I grep the logs, there is only one key listed. I delete the space, delete the key (per the kb article) and re-do the import. It fails again, but with yet another key violation (different key this time). It seems like I'm going to have to keep trying this one key at a time. Since it takes almost an hour to delete the space, if there are more than a dozen of these keys, I'll be here for weeks.

Is there another way to get around this? Is there a way to find these orphaned keys before I do the import? Is there a way to sift the incoming keys from the import prior to using it to pre-check them?

Rich


Answers:
author: Richard Whiffen
body: Here's what I'm trying so far:

I've taken the ID's from the import: grep "\<property name=\\"entityId\\" type=\\"long\\"\>" entities.xml \> entities.txt

I've taken the existing ID's from the DB (mysql): select entity_id from OS_PROPERTYENTRY WHERE entity_name = 'confluence_ContentEntityObject' INTO OUTFILE 'db.txt';

I've sorted and unique'd them: sort -u entities.txt \> imp-ids.txt; sort -u db.txt \> db-ids.txt;

I've found the intersection of the sets: comm -12 imp-ids.txt db-ids.txt \> conflict.txt

This has given my 2291 ID's that I believe are in conflict. I have done another test import and the failing ID was listed in my conflict.txt file, so I believe I have the list of ID's to delete.

comments: author: Richard Whiffen
body: So this worked, I did a for loop and did a delete from OS_PROPERTYENTRY WHERE entity_name = 'confluence_ContentEntityObject' AND entity_id=${ID} (this isn't the exact syntax, don't cut and paste...)


author: BernardoA
body: Hi Richard,

As far as I know is necessary to delete one by one, but hoenstly I don't know other way to remove all duplicated.


Tags: import
Creating a space in Confluence yields an error.
Asked by Frank Gutierrez:

Cannot create a new space in Confluence after installation. Error says:

The web page at <http://10.11.163.243:8090/spaces/createspace.action> might be temporarily down or it may have moved permanently to a new web address.

Error 330 (net::ERR_CONTENT_DECODING_FAILED): Unknown error.


Answers:
author: D Bush
body: I had the same issue. I contacted Atlassian, [https://support.atlassian.com/browse/CSP-99389](https://support.atlassian.com/browse/CSP-99389.). I rebuilt the plugin cache and I could create spaces again.


author: twong_atlassian
body: This is a complete guess, but other people on the net have noted that this could be a problem with Chrome's gzip encoding. Can you check in the admin\> general settings screen to see if gzip compression is enabled? Does this work fine in other browsers?

Tim
How do I remove the top bar containing breadcrumbs/browse/login/search?
Asked by J. Caldwell:

I've been presented with a problem where a group wants their own Confluence instance because they want to restrict folks to looking at mostly the space content and not the rest of confluence. But they also like the documentation theme...I'm attempting to obscure the breadcrumbs, Browse, Login and Search top bar in an attempt to force folks into specific behavior.

Another option would be to have it only avaliable to another specific group.

Ideas?


Answers:
author: Robert Chang
body: Hi,

You can probably achieve what you want through CSS, via Confluence Admin \> Stylesheet (if you want the change to be global) or Space Admin \> Stylesheet (if you want to apply to specific spaces). For example, here's how you hide the entire header bar:

```
#header {display:none;}
```

You can inspect the page element for whatever you're trying to obscure in Firefox (with Firebug) or Chrome to get its class or ID.


author: Amalia
body: Another approach is to customize the layout by going to **Confluence Admin \> Layouts** and choose to edit/create custom on **Main Layout**. Delete the following line which is used to render the top bar:

```
#parse($!theme.topNavLocation)
```

You can show this top navigation bar to only a specific group in Confluence. Refer to this documentation for more info: <https://confluence.atlassian.com/display/CONFKB/How+to+Display+Different+Appearance+for+Different+Users+Using+Confluence+Layouts>


author: Larry Bear
body: Regarding `#header {``display``:``none``;}`

If want to keep some of the options, but remove specific buttons - how can I do that (not the whole header?

Thanks.
Adding new role for Seraph custom path
Asked by Matthew J. Horn:

Sorry for the noob question, but I am just now discovering Seraph as it is used in Confluence.

I would like to add a role in the seraph-paths.xml file to map it to a path. The only two roles used in the default seraph-path.xml file are constants defined by the ConfluenceRoleMapper class:

```
&lt;path name="adminJspPath"&gt;        &lt;url-pattern&gt;/admin/*.jsp&lt;/url-pattern&gt;        &lt;role-name&gt;admin_jsp_role&lt;/role-name&gt;    &lt;/path&gt;    &lt;path name="admin"&gt;        &lt;url-pattern&gt;/admin/*&lt;/url-pattern&gt;
```

```
&lt;!-- CONFLUENCE_ADMIN_ROLE --&gt;        &lt;role-name&gt;confluenceadmin_seraph_role&lt;/role-name&gt;    &lt;/path&gt;
```

Is it possible to add another role? For example, a Crowd or Confluence role?


Answers:
author: Matthew J. Horn
body: Looks like any Crowd group is allowed as a value for the role-name. Sweet!


Tags: authentication

seraph
Avoiding fancybox for thumbnail images viewing in Confluence 4
Asked by Ken Poulton:

We use thumbnail images a lot (scores of images in some pages) and found the "fancybox" display introduced in Confluence 3 to be very bad for our usage:

- can't resize the image  
- no zoom to see full resolution  
- presents the browser window from doing anything else  
- more clicks to switch between two images  
- "open link in new window" doesn't work to allow viewing multiple thumbnails

Fortunately, in Confluence 3 there was a workaround: disabling Thumbnail Image Web Resources. We are using it that way quite happily.

Is there a way to do this in Conflunce 4? I don't see Thumbnail Image Web Resources.


Answers:
author: Ken Poulton
body: Thanks, but I don't want to disable viewing thumbnails as in the link [https://answers.atlassian.com/questions/116396/how-to-disable-the-full-size-image-option-when-clicking-on-an-image](../116396/how-to-disable-the-full-size-image-option-when-clicking-on-an-image)

What I want to do is get thumbnails to display (fullsize) in separate popup windows instead of popovers (fancybox).


author: CharlesH
body: This post was made 7 hrs ago and has the answer you need I think.

<https://answers.atlassian.com/questions/116396/how-to-disable-the-full-size-image-option-when-clicking-on-an-image>


Tags: image

thumbnail
Adding "create this page" link on "Page not found" pages
Asked by Jeff Chapin:

We have an existing internal utility that automatically creates links to additional information about all of our servers, of the form <http://confluence.domain.edu:8090/display/SYS/sboxpup.domain.edu> . If this page pre-exists, everything is fine. If this page does not exist, we are given a default 'Page not found' page, and not given an option to create it. We would like to be able to add content to this URLs on-demand. Is this possible?


Answers:
author: twong_atlassian
body: Hi Jeff:

Was an interesting problem.

You can alter the 404.vm velocity file that controls the 404 page in confluence. You can create a page on confluence by simply hitting [http://yourinstance/pages/createpage.action?spaceKey=SOMEKEY\&title=SOMETITLE](http://yourinstance/pages/createpage.action?spaceKey=SOMEKEY&title=SOMETITLE)

As such, I was thinking of just adding a link to 404.vm which gets shown on a page not found that reads the missing title and constructs a url as mentioned above.

Easy enough right? Well, this is where I ran into a wall. One of the features of Confluence is that we will search for analogues of your page title before returning 404, so that if you wanted a page like 'hoem' it might find the 'home' page in your space. You can usually figure out what page you're on or what url got you to a particular location using some of the objects in <https://developer.atlassian.com/display/CONFDEV/Confluence%20Objects%20Accessible%20From%20Velocity>. Hoewver, because we direct you first to the PageNotFoundAction then to the FourOhFourAction upon failure to find mispellings, we lose the original title/request url.

Lame. You could hard code the right space.... but then you'd still have to type in a title (if you omit the \&title part of the url, it'll just be "new page")

Of course, you could muck with PageNotFoundAction.java, and change the behavior of the whole thing... but thats a rather large change.

Meh... not a great answer for it, but this is where I drew the line and gave up.


Tags: error
Confluence table-data into another Space
Asked by Michel Marcoux:

Is it possible to get the values entered in a table data from one Confluence space to another?

Let say I have a space called 'Planification1' with table-data like this with full of data already entered:

{table-data:Priorities}  

<br />

I want to display that table in another space as well, called 'Planification 2''   

But when i copy the same code, I got no data. How can I make the data available in my other Space?

sorry im a beginner in Confluence :P


Answers:
author: CelesteCS
body: Hello!

For any calculations in Confluence, including any manipulations with table data, located on other Confluence pages, you may use [CelesteCS Math for Confluence](https://marketplace.atlassian.com/plugins/com.celestecs.confluence.celestecs-math).

You may refer other space table cells one by one and thus building new table.

There is a plenty of other functions in the macro, so you may perform any calculations using formulas in EXCEL style.

Thanks!


author: Bruce Schlueter
body: Hi Celestar2,

have you tried to work with the {include} macro or perhaps{excerpt include} macro. These macros are meant to show content from one page on another.

Regards, Bruce


Tags: table
Protecting assets in Confluence
Asked by Matthew J. Horn:

We have Crowd/Confluence connnector that prevents unauthorized users from accessing the Confluence-rendered pages.

However, anyone (include external remote hosts) can still access directories such as images, includes, and other files. Is there any way to prevent access to these from non-authorized users?

For example, to view content on our Confluence site, you'd need a login to view <http://mysite.com>. However, you could access images, for example, at <http://mysite.com/images/en_GB.gif> or raw decorator source files, for example, at <http://mysite.com/decorators/admin.vmd>.

Does anyone else see this as a security issue?


Answers:
author: Adam Laskowski
body: The images directory in your instance contains a lot of the standardized Atlassian logos and images that we use all around the site that need to be accessible to anonymous viewers. For instance, your site logo on the Confluence login page has your site logo stored in /images/logos, and without anonymous access, the user would just see a broken image link when logging in. All images uploaded to your site by users are behind the /download/attachments resource, which is login protected so long as you don't have the global and space permissions for anonymous users set.

As for the Velocity files, I'm unfortunately a little less knowledgeable about the need for anonymous access to the content. However, if you haven't made any customizations to the files themselves, they should not have any information to worry about. More importantly, the anonymous access to either of these resource locations does not inherntly put you site at risk.


author: Matthew J. Horn
body: FWIW, I figured out a way to do this using the Seraph-based authentication that is built into Confluence. This is the same authentication that protects the "admin" panel. I'll blog about it and try to capture the steps to use it.

comments: author: Steven F Behnke
body: Please do!


Tags: decorator

image

security
Using variables with CSV Plugin
Asked by Patrick Toy:

I'm not sure if this is possible, however I would like to use a variable to store the filepath name of the CSV file being rendered by the CSV plugin.

For example, I have a task set to run in which a report is generated in CSV format. The report that is generated appends the current system date in the format DD_MM_YYYY_HH_MM_A(P) to the end of the filename. I would need to be able to use the Run plugin (or something similar) to set and update a Confluence variable to match the newest filename and present the most recent report.

If this is possible, please let me know. Thanks in advance.


Answers:
author: Bob Swift (personal)
body: Yes, you should be able to use the **run** or **run-now** macro to retrieve the **$current_time** and the **dateFormat** parameter to get a format matching your naming convention. An alternative is to write a small script (groovy) to get the most recent file in the directory. Use **cache** macro to improve performance.

comments: author: Patrick Toy
body: Alright, and how would such a variable be passed to the CSV plugin? Would I precede it with a '#' the same as I would with a standard filename or is there some other syntax?


author: Bob Swift (personal)
body: Something like:

```
{run-now:dateFormat=...}{csv:script=#filename$current_time}{csv}{run-now}
```


Tags: app

csv
2 different autoreply messages
Asked by Mikhail Begov:

Good day, Sirs!

Can i make 2 adjustable email autoreply messages using Jira and its plugins?

For example:

I have 2 mailboxes [info@mycompany1.com](mailto:info@mycompany1.com) and [info@mycompany2.com](mailto:info@mycompany2.com), I need to have different helpdesk autoreply for eachother.

Your task to helpdesk of company1 has been added from [helpdesk@company1.com](mailto:helpdesk@company1.com) and Your task to helpdesk of company2 has been added from [helpdesk@company2.com](mailto:helpdesk@company2.com)

If it is possible, how can i make it?

If not how much it will be cost us to develop it using your service.

Thanks a lot.


Answers:
author: Sreenivasaraju P
body: I hope you know, we can create custom mail templates and events.

Then Create different workflow and associate different custom mail events to them. Two different mails will go.

If you want more info regarding custom events

<https://confluence.atlassian.com/display/JIRA/Adding+a+Custom+Event>


author: Sreenivasaraju P
body: Need few more details from you.

What are you doing with mails coming to two different mail boxes?

Are you logging tickets with these mails? If yes, are you logging the requests to the same project and same issue type?

If you are not logging the requests to same issue type and same project then you create two different custom events and trigger them correspondingly.

comments: author: Mikhail Begov
body: I need this mails to be registred in Jira and replyed by apropriat autoreply about ticket creation.

Who can i make such config?

Thanks


author: Sreenivasaraju P
body: Is the ticket creation is happening in the same project and same issue type?


author: Mikhail Begov
body: No in the different projects.
ImageMap Plugin: Linking to anchors
Asked by Javier Olazaguirre:

Hi all,

Im using the ImageMap plugin that works great when linking an image map to a specific page. But I want to map the image to certain anchors in the same page.

I could move all the different anchored content to new pages, but this is a hassle and I wanted to have everything in one page, so it can be quickly scrolled up and down instead of clicking all the different image maps to get the info.

Any idea if this is possible with the plugin as it is? Or any way around?

Thanks!


Answers:
author: Adam Laskowski
body: It doesn't look like the plugin allows you to specify page anchors when using page names as opposed to absolute URLs. Might be an improvement the developer can implement ([contact info](https://marketplace.atlassian.com/plugins/de.dl.confluence.plugin.imagemap.ImageMapPlugin/version/22/support)).

In the meantime, instead of using the auto-complete and putting a page name, use the full URL to the anchor and it will work in the image map (per the [Working with Anchors](https://confluence.atlassian.com/display/DOC/Working+with+Anchors#WorkingwithAnchors-Creatingalinktoananchor) doc). The format looks like this:

<http://myconfluence.com/display/spacekey/pagename#pagename-anchorname>

So for a page name "Test Page" and an anchor name "Test Anchor," the URL would look like:

<http://myconfluence.com/display/spacekey/Test+Page#TestPage-TestAnchor>

The one downside is that you will have to manually update your image maps if you either rename the page or the anchor.

comments: author: Michael Yankelev
body: This does work, with the drawback stated that if any of the names change, the links will all need to be manually updated.

Any possibility of sorting this out, either with the imagemap or anchor plugins (not sure where the problem actually resides).


author: Adam Laskowski
body: Since the Image Map plugin does not support anchoring, I believe it would require feature development within the Image Map plugin in order for it to support the dynamic naming functionally in Confluence anchors. The developer contact details are here:

<https://marketplace.atlassian.com/plugins/de.dl.confluence.plugin.imagemap.ImageMapPlugin/version/22/support>