youngmon/atlassian-qna huggingface dataset:
Weird internal external url problem
Asked by Rumceisz:

Hi All,

we use 2 URLs for our Confluence: one is an internal which can be reached only from the company intranet, the other is an external which can be reached from everywhere.

We use version 4.2 Confluence.

The weird thing is that when we are on a page with the internal URL and we write a comment to the page, we push the Save button and the URL changes to the external URL! The Confluence doesn't logged us out, we are logged in henceforward. So it is not a blocking problem just a weird phenomenon.

What can be the cause?

Regards,  
Rumi


Answers:
author: Alex Suslin
body: Ask your system administrator to setup network in a way that your external url packets will be routed internally and use the single URL.


author: Nic Brough -Adaptavist-
body: Confluence only expects to run on one url and uses the "base url" to define it. It sounds like your base url is set to the external url, so Confluence is happily using it to generate the next url to go to after many actions.

There is no way to "fix" this inside Confluence, because it's not doing anything wrong. I'm not even sure you can fix this within your network - you could start messing around with Apache and rewriting urls (I'm out of my depth on that, I just know it can be done), but I really don't know how you'd get Apache (or any other web server) to detect when it should rewrite the internal/external url.

comments: author: Rumceisz
body: Hi Nic,

I agree, but why didn't occur the same phenomenon in the version 3.5.13? We have used 2 URL's since ages but never met the same problem. We just - last week - upgraded our Confluence to 4.2. Since then we ran into this.


author: Nic Brough -Adaptavist-
body: I don't know.

My best guess is that your network admins had set up something that was doing the rewrite for Confluence 3.5. The newer version of Confluence may have changed the url formats (noticably after completing actions?) so the old filters can't pick up the rewrites. But I really am guessing. On the 3.5 install in front of me, without any networky cleverness, I'm seeing exactly the behaviour you're getting on your 4.2 install, so I don't think it's Confluence at all.


author: hsuhailah
body: As a rule of thumb, you will need to have one single URL which matches the server base URL (Confluence Admin \> General Configuration \> Server Base URL) to get all the functions to work properly.

comments: author: Rumceisz
body: Hi Hanis,

I have a server Base URL which is the external URL.

Why is the URL changed when commenting? Confluence didn't do that before the upgrade (earlier version was 3.5.13).


Tags: url
How can I set space permissions for certain groups using the CLI plugin
Asked by Patrick Williams:

Hi

Using the CLI I am creating spaces, pages, groups, users etc but I just need something that will allow me to edit the permissions of groups assigned to a particular space

Something like this would be good

confluence --action setGroupPermission --group "test1" --space "testgroup" -- permissions "edit"

Thanks in advance


Answers:
author: PeterKoczan
body: Hi Patrick,

Please refer to my answer on your previous question ([https://answers.atlassian.com/questions/64866/is-is-possible-to-assign-a-group-to-a-spaces-view-space-permissions-using-the-cli-plugin](/questions/64866/is-is-possible-to-assign-a-group-to-a-spaces-view-space-permissions-using-the-cli-plugin))

In this particular case, where you're looking for a command line to add **edit** permissions for a group on a particular space the same command would look something like this:

```
confluence --action addPermissions --space "&lt;SPACE&gt;" --group "&lt;GROUP&gt;" --permissions "editspace"
```

Refer to: <https://bobswift.atlassian.net/wiki/display/CSOAP/Documentation#Documentation-addPermissions>

Kind regards,

Peter

comments: author: Patrick Williams
body: Fantastic! thanks Peter


Tags: cli
Error rendering macro.
Asked by Alex Sh:

Hi all. I have next errors in text field on my confluence page

1. Error rendering macro 'list-data' : Unsupported type: class org.randombits.confluence.metadata.reference.WikiReference

2. Error rendering macro 'text-data' : \[com.ctc.wstx.exc.WstxLazyException\] Unexpected character '=' (code 61); expected a semi-colon after the reference for entity 'FolderCTID' at \[row,col {unknown-source}\]: \[1,926\]

This errors were appered after confluence update from version 3.5 to 4.2

Any idea how to solve this problem?


Answers:
author: CharlesH
body: List-data and text-data both come from the Scaffolding plugin by Customware. Have you upgraded the plugin as part of your upgrade? Because of the changes in Confluence, the old version of Scaffolding won't work.

comments: author: Alex Sh
body: i use scaffolding 4.0.3, as far as i know this is last version.


author: CharlesH
body: Actually encountered this issue myself today. Make sure you're closing your list-data and text-data macros correctly.

Also, in our case, we were using the list-data to provide a pick-list of users in confluence-users. After migrating the page from one instance to another (via XML backup \& restore), we got a randombits error message on screen. We worked out this was due to a user being present in the first instance but not the second. I'd say this is a bug, as the situation could be handled more nicely, but I'll raise that with CustomWare.

comments: author: Alex Sh
body: So, i want to describe my investigation about this problems. So, the problems with wiki reference have next reason. If i have XHTML data stored in field, confluence can return result both in String and like WikiReference Object. I write custom plugin which remigrate data from this field divided by "instance of" and all now is ok.

second problem appeared when you have some unnessassary symbols inside migrated links in my case problem was that in fields stored links with bad formats for example 2 links in one xHTML tag.

So that's answer.

Thanks for help.


Tags: markup

renderer

rich-text

scaffolding
Page crash in Google Chrome
Asked by Rumceisz:

![](../../../upfiles/create_page_crash.jpg)Hi All,

I ran to the following error in Confluence when I created a new page. The browser is Google Chrome. What is the problem?

The error comes again and again.

Thanks for help!

Rumi


Answers:
author: Matthew J. Horn
body: My first thinking is that it's an issue with the encoding -- those funny characters all over the place are what the browser inserts when it can't render a particular glyph.


author: hsuhailah
body: That's weird. What's your Chrome version? Is the same issue reproducible on another browsers and does the same issue happened when you tried to create new page on another space? Try also clear the browser cache or add-ons and try again.


Tags: error

page
Is is possible to assign a group to a spaces view space permissions using the CLI plugin
Asked by Patrick Williams:

Hi

For instance it would be great if there were a function something like this

confluence --action addGroupToSpace --title "patsgroup" --space "test1"


Answers:
author: PeterKoczan
body: In addition, the command itself would look something like this in your case:

```
confluence --action addPermissions --space "&lt;SPACE&gt;" --group "&lt;GROUP&gt;" --permissions "VIEWSPACE"
```

comments: author: Patrick Williams
body: Great just what I wanted


author: PeterKoczan
body: Dear Patrick,

Please refer to the CLI documentation found here, for your specific question: <https://bobswift.atlassian.net/wiki/display/CSOAP/Documentation#Documentation-addPermissions>

Please let me know if it helped :)

Kind regards,

Peter Koczan


Tags: cli

permission
Any experience fighting issue with move page notifications in Confluence 3.5?
Asked by Anna Gunich:

There is a known bug connected with the incorrect "From" value in the notification when moving page in Confluence.

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

The bug is fixed only in 4.0 and no workarounds suggested for earlier versions of Confluence.

Can you share your experience in fighting this problem in your Confluence \< 4.0?

I thouht of changing a email template, but not sure it will help.

Thanks.

Anna.


Answers:
author: LuizA
body: Hello Anna,

Based on the bug report a workaround would be to get the modifying user out of the event instead of using the last updated user from the content as we can see in this comment:

[https://jira.atlassian.com/browse/CONF-21969?focusedCommentId=223887\&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-223887](https://jira.atlassian.com/browse/CONF-21969?focusedCommentId=223887&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-223887)

But anyway, the best way to solve this kind of behaviour in Confluence would the upgrade to the 4.0 that is the fix version, you're not seeing more comments in this bug report because normally when there's a fix version, most of our customers normally perform the upgrade to solve the problem, which is the recommended approach.

Hope this helps.

Kind Regards,

LJ.

comments: author: Anna Gunich
body: Hi Luiz,

Thanks for the reply. This indeed seems to be the only solution apart the upgrade.

I will mark the question an answered as I do not expect any other solutions.

Thanks again!

Anna


Tags: email

move

page
Is there a way to force users to change their password on next Confluence login?
Asked by MICHAEL O'Neill:

Is there a way to set a flag on a user's account somehow so that they are required to change their password then ext time they log in to Confluence?

If there's no ready way to do it, is there a straightforward way to make that happen through API, custom programming?


Answers:
author: Thomas Schlegel
body: Hi,

look here: [https://answers.atlassian.com/questions/8838/how-to-force-users-to-use-strong-password](/questions/8838/how-to-force-users-to-use-strong-password)

Maybe this plugin helps

Best regards

Thomas


Tags: password
CSS Version of Adding Images to Headers and Footers
Asked by Lawrence Ho:

On the page:

<https://confluence.atlassian.com/display/DOC/Advanced+PDF+Export+Customisations#AdvancedPDFExportCustomisations-headerfooter>

It illustrates how to add an image to header or footer in HTML:

|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `<``div` `style``=``"margin-top:10mm"``>` ` ``<``img` `src``=``"/download/attachments/12346/header-image.png"``/>` `</``div``>` However what is the CSS StyleSheet version of the above? I tried to incorporate the HTML in the layout and it doesn't seem to work for me. However, changes in the stylesheet seems to work...but I haven't figured out how to get the image into a header. |


Answers:
author: Alejandro Conde Carrillo
body: CSS does not do content, but there is a way to insert a background image. If you give the rigth format to the image, you can get good results. An example using as a base the one provided in the manual coudl be:

```
@page{    @top-center    {        background-image:url('/download/attachments/12345/image.jpeg');        background-repeat:no-repeat;        background-position:right top;        content: "Document Title Goes Here";        font-family: ConfluenceInstalledFont, Helvetica, Arial, sans-serif;        font-size: 8pt;    }    @bottom-center    {        content: "Page " counter(page);        font-family: ConfluenceInstalledFont, Helvetica, Arial, sans-serif;        font-size: 8pt;    }}
```

This example takes an image which has been attached to Confluence. You will need to replace the URL for the one for your attachment.


author: Lawrence Ho
body: I have the same problem 'Lawrence Ho' has.

Add an Image via 'PDF stylesheet' as background-image works fine but adding an image via 'PDF Layout' and HTML  
`<``div` `style``=``"margin-top:10mm"``>`  
` ``<``img` `src``=``"/download/attachments/12346/header-image.png"``/>`  
`</``div``>`  
does not work.  
This is a pitty because there are much more things that you do with HTML than with CSS  
You will find the reason in the confluence manual: The custom styles defined in the PDF export stylesheet will be applied to all pdf exports, but the customizations of the PDF layout only take effect when exporting in the **Browse Space** section. They won't be applied when you export a single page over **Tools =\> Export to PDF**.

comments: author: Lawrence Ho
body: Not sure how to add an image such that it appears as the header for every page....


author: David at David Simpson Apps
body: I'd be somewhat surprised if a CSS background image would show up on a PDF export. Use an image :)

comments: author: Frode Evensen
body: I can confirm that CSS background does in fact show up on PDF export on Confluence 6.8.0 :-)


author: David at David Simpson Apps
body: ?


Tags: cloud

confluence-cloud
Need to integrate MySQL with confluence to retreive regression test results and display in charts
Asked by vijaya bylaiah:

Need to integrate MySQL with confluence to retreive regression test results and display in charts


Answers:
author: Bob Swift (personal)
body: Easy to do with the [Confluence SQL Plugin](https://bobswift.atlassian.net/wiki/display/SQL) but that is only available currently for **non** OnDemand environments :(. There is an enhancement being worked on to allow SQL plugin result data to be pushed to an OnDemand environment. It is not as easy as the direct plugin but will work for some use cases. Add a comment to the plugin page if you need more details.

comments: author: vijaya bylaiah
body: Hey bob ,

thank you on that link , i would like to use the sql and query the regression test results into charts can i do that


author: Bob Swift (personal)
body: Yes, you can query anything and feed it into the chart macro.


Tags: cloud

confluence-cloud
Script which result all the space name in a Confluence instance
Asked by Rumceisz:

Hi All,

I have a connected Jira and Confluence instance and I have a custom field which contains all the existing space names of the Confluence. This custom field serves the space admins when they request to add users to their own space. In this case they have to select the appropriate space name from this list.

Thw problem is that the space admins use to change the space names very often and it's very cumbersome to update manually the options of this custom field every time.

For first: is there a script which results all the existing space names?

And then I would set this script to a custom field (if I can..)

Thanks in advance for the help!

Rumi


Answers:
author: David at David Simpson Apps
body: Calling [http://confluence.example.com/rest/prototype/1/space](http://localhost:1990/confluence/rest/prototype/1/space) on a Confluence server would produce some JSON with a list of spaces:

```
{"expand":"space","space":[{"id":"65537","key":"ds","name":"Demonstration Space","title":"Demonstration Space","link":[{"href":"http://localhost:1990/confluence/rest/prototype/1/space/ds","rel":"self"},{"href":"http://localhost:1990/confluence/display/ds","type":"text/html","rel":"alternate"}],"description":"","lastModifiedDate":{"friendly":"Sep 16, 2008","date":"2008-09-16T13:42:44+0100"},"createdDate":{"friendly":"May 15, 2008","date":"2008-05-15T05:15:14+0100"},"wikiLink":"[ds:]","type":"space"}]}
```

You could then create the select field from the results

comments: author: Rumceisz
body: Hi David,

I never seen like this? What's that? The link is unavailable.

Rumi


author: David at David Simpson Apps
body: Don't click on the link -- it's only an example! Try this instead: <https://confluence.atlassian.com/rest/prototype/1/space> It gives XML rather than JSON, but the logic still holds up.

You'll need to login to your Confluence server and replace the hostname with yours.

Admittedly, this doesn't give you the complete answer, but hopefully nudges you in the right direction to get the information you need :)


Tags: custom-field

jira

space
What's the best way to manage plugins in Confluence ?
Asked by Jason Pepper:

Whilst I really like the concept of an open marketplace for plugins providing functionality, once you have decided upon a set of plugins for a production implementation you really don't want to change them.

In a properly managed production environment it would be prudent to have a failover server which should be identical in configuration (incl plugins) so that the failover is as simple as possible.

Furthermore, in a properly managed environment you would also have test and development servers to enable the development of content, procedures and the like.

So, my question is this..

Does there exist a mechanism or strategy for the managing of plugins to enable the swift building of a dev/test server so that it is identical in configuration without having to MANUALLY install all the plugins one by one ?

The reason I ask is that I am faced with this task regularly when creating/destroying test VM's and it is really beginning to annoy me !

Thanks for any input ;-)


Answers:
author: Jobin Kuruvilla [Adaptavist]
body: There is no easy way! You will have to follow the below documentation:

<https://confluence.atlassian.com/display/DOC/Migrating+Confluence+Between+Servers>

If you read between the lines, there are 4 major steps:

1. Get a backup of Production DB

2. Get a zip/tar of Production JIRA installation and Home directories and move them to Test server

3. Point the Test JIRA to the DB in stpe 1 before you start it up

4. Do a reindexing

comments: author: Jason Pepper
body: Thanks for your answer, but I already figured that out for myself.

Strikes me that this kind of thing shows the immaturity of Confluence and Atlassian themselves at the concept of grown-up enterprise mission critical systems management.

Ideally I'd want to be able to take a nightly export and apply it every day to a cold-failover machine using a set of automated scripts so that automated failover could occur without the need to employ a cluster and only incur the cost of a 24 hour maximum data loss.

Maybe it'll come soon - I hope so.


author: Jobin Kuruvilla [Adaptavist]
body: > Maybe it'll come soon - I hope so.

Me too! They are a company that concentrate more on product features, which is a good thing for users.

However, they are making lot of admin improvements recently - an upgrade tool is just one of them. More will follow I think.
Is an 11Gb export file considered 'Large' ?
Asked by Jason Pepper:

I come from an Oracle DB background where an 11Gb export file would not be considered large..

Our current production Confluence instance running on MySQL is exporting at around 11Gb at the moment.

Is an 11Gb export file considered 'Large' in Confluence circles ?

I'm seeing some corruption on test imports at the moment, so I was wondering if size was a problem (so to speak)..

Cheers


Answers:
author: Jason Pepper
body: Turned out that the the problem lay with the zip executable on the machine. It wasn't able to deal with files above a certain size. When I used another zip extractor, magically it all worked !


author: CharlesH
body: Tip: clean out the recycle bins for the spaces you think have the most edits. You don't want to export data (pages and larger attachments) that you don't really need.


author: Matthew J. Horn
body: Yes. We have about 500 pages in a confluence server and the total database export (minus the markup stuff) is less than 50 megs. That means you are exporting the contents of roughly 50,000 pages? I would say that's large.

comments: author: Jason Pepper
body: We have a large quanitity of attachments, I'm guessing that makes a big difference..


author: Matthew J. Horn
body: One thing I would do to reduce database load is to store the attachments on the file system (rather than in the database -- I'm guessing you already have done this, but figured I'd mention it if not). There's an option in the Admin panel to do that.


author: Nic Brough -Adaptavist-
body: Pff, ours is about 150Gb. ;-)

I know it's down to attachments though - without them, it's more like 5Gb for 80,000 pages (and a lot of revisions)

comments: author: Matthew J. Horn
body: That's not a knife.

THAT'S a KNIFE!
Linking to Attachments Page
Asked by Richard S:

Apart from using the Attachments option under the Tools menu, how would I link some text in my page to the attachments page?

I'm creating a template set of pages for a projects team, and have set up a dummy project and help. I want to be able to say something like - 'To view attachments on the page, just click here'.

I can find out the URL of the attachments page and link to that, but that is not quite what I am looking for, as I want the project to be used as a template to create other projects from, and I don't want someone to have to amend that link each time.

Is there something like linking to a heading (#Heading Name) that I could use, so that the link would never need updating, as it would always link to the relevant attachments page for a newly created project page?

Hope that all made sense. =)


Answers:
author: Thomas Schlegel
body: Hi Steve,

not exactly what you want, but maybe this helps: <http://davidsimpson.me/2009/10/16/a-simpler-way-to-view-attachments-in-confluence/>

With the Composition Plugin, the user can toggle the visibility of the list on the page.

Cheers

Thomas


Tags: attachment
how to keep track of the visits/hits on every page, and record the comments of the visitors in confluence?
Asked by pritika madkaikar:

This is to find out which data is more useful, and which needs to be corrected/eliminated, in due course.

There would be pages with data, which become useless after a certain period, and would have to be eliminated etc.


Answers:
author: Thomas Schlegel
body: Hi,

you can keep track of the hits with the tracking pluging from customware: <https://marketplace.atlassian.com/269>

Or maybe use the rate makro to let the user decide, if a page is useful: <https://marketplace.atlassian.com/181>

Best regards

Thomas
Code block macro issue in PDF export
Asked by MPal Pal:

Hi All,

Has anyone noticed that the code block macro in new confluence 4.2.2 release does not get rendered in PDF export. The PDF file shows the following exception:

Error rendering macro 'code' :

Anyone knows how to resolve this please?


Answers:
author: hsuhailah
body: The version will be based on the .jar file bundled in Confluence. The latest version available now is [New Code Macro Plugin version 2.0.14](https://marketplace.atlassian.com/plugins/com.atlassian.confluence.ext.newcode-macro-plugin). You can try to install this and check out if the problem persists or otherwise.


author: Helen Griffith
body: The problem with exporting a code block in a PDF exists in version 6.0.0, nearly 4 years later...

comments: author: Jonathan Ben Ami
body: 6 years


author: Helen Griffith
body: Wow


author: Erwin Rooijakkers
body: The CodeBlock works now, but the Better Code Block does not.


author: MPal Pal
body: Thanks a lot for the help. It works well after installing new version. :)


author: MPal Pal
body: Thanks Hanis. It works well in wiki pages. Error is shown only when exported to PDF.

Isn't code block macro coming with the new version by default?


author: hsuhailah
body: First of all, can the code be used in Confluence pages as expected? This is not reproducible on my end though. What is the version of new code macro plugin installed in your instance?


Tags: code-block

export

pdf