Blog Archives

Confluence tip – how to hide child pages in the Documentation theme

This hint is for people who are using the Documentation theme in Confluence wiki, and want to hide the child pages that are shown at the bottom of every page. After all, the left-hand navigation bar in  the Documentation theme shows a page tree, including all parent and child pages. So it’s probably overkill to show the children at the bottom of every page too.

Confluence tip - how to hide child pages

To hide the child pages, add some CSS to the space. This is the CSS you need:

#children-section{   
display:none;   
}

I’ve tested the above CSS in Confluence 4.3 and 5.0.

To add the CSS to your space, you need space administrator permissions. Go to BrowseSpace AdminStylesheet, edit the stylesheet and dump the above code into the text box.

The documentation has more guidelines on using custom stylesheets: Styling Confluence with CSS.

Have fun!

How to change the username for all pages in a Confluence space

Sometimes you may want to do a bulk update of the usernames on all pages in a Confluence space, to change the creator of all the pages. This may be necessary if someone leaves the company, for example, and for some reason you need to change the “owner” of all pages. Or perhaps you have changed your name, and want the pages to be registered in your new username. There isn’t an easy way of changing a username in Confluence. This post describes a partial solution to the problem, with some caveats.

There isn’t any easy way of changing usernames in Confluence. (See the feature request.) The current process involves some heavy database manipulation, as described in the documentation: Changing Usernames.

A partial solution for changing the creator of all pages in a space

This is an alternative solution that may be useful under specific conditions – see the caveats below. You can install the Copy Space plugin and use it to copy the space to a new space. Untick the option called “Use existing authors and dates”.

Copying a space

This will copy your space to a new space, with a new space key. The author of all the pages will be the person who copied the space.

Please note the following caveats:

  • All links coming into the space from outside will be broken, because the new space has a new space key. This affects URLs that use the space key and page name, including links from outside the wiki and from other Confluence spaces on the same wiki. However, you can get round this by deleting the original space, then copying the new space a second time and specifying the original space key.
  • All links that use tiny links (permalinks) will be broken, because every page gets a new tiny link in the new space. Every page gets a new identifier too.
  • The Copy Space plugin copies only pages, with their attachments and comments. It does not copy blog posts or mail archives.
  • You will lose all page history. The plugin copies only the latest version of each page.
  • This solution changes the creator of every page in the space, not just those added by a given username.

In other words, the above method may be useful if the above points are not a drawback in your situation.

It’s definitely worth testing the solution in a test environment and assessing the results before using it for real.

Confluence tip – HTTP 500 or 504 error with Copy Space plugin

This tip is for people using the Copy Space plugin on Confluence wiki. If you’re copying a large space, you may see an HTTP 500 or HTTP 504 server error a few minutes after starting the space copy. Don’t panic. It’s likely that the copy process is still going on. Whatever you do, don’t close the browser tab or window until you know for sure.

It happens to me often, and it happened in a rather spectacular fashion earlier this week. I’m letting you know, in the hope that I can save you from a moment of panic. Or, as in my case this week, from a few hours of unnecessary frenzy.

About the HTTP 500 and HTTP 504 errors

When you get an HTTP 500 error, your browser window displays a message something like this:

  • 500 Internal Server Error
  • Internal Server Error
  • HTTP Error 500

The error message is a bit useless. It doesn’t give you much information, and it sounds very dire. Basically, it means that something has gone wrong and the server can’t give you more information. This is the error we get when using the Copy Space plugin on our production documentation wiki.

I’ve also seen an HTTP 504 error appearing in the same situation on a test server. It seems that the server configuration determines which error you get. HTTP 504 is a Gateway Timeout error. That’s a bit more helpful and a little less scary.

What to do if you get an HTTP 500 or 504 while copying a space

First, wait a while. It is most likely that the front end has timed out, but the copy process is still happening in the background. Do not close down your browser.

Open another browser window or tab, and try going to the address of your new space. The space will become available when the copy operation has finished. Keep trying.

How long should you wait? Ah, now there’s the rub. The copy operation can take anything from a few minutes to a few hours, depending on the size of your space. Until this week, I would have said 2 hours was the maximum time to wait. This week, one of our spaces took 5 hours to copy. I guess the answer is: It depends on your previous experience with copying spaces on your wiki.

When the waiting period has gone on too long, raise the alarm with your system administrators. Ask them to examine the logs to see what has happened, and to determine whether the process is still running.

If you have no joy there, start the copy process again.

What is the Copy Space plugin?

The Copy Space plugin is an add-on that you can install into your Confluence wiki. It gives you a way to copy the content of a space to a new space, with a new space key. One of the Confluence developers wrote this plugin for the Atlassian technical writers, and it’s available for everyone else to use too. It is not a supported plugin, but we use it all the time. It would be very difficult to do without it.

There’s a request for the Copy Space plugin to be supported and bundled with Confluence: CONF-14198. If you like, you can vote for and comment on the issue. If the plugin were supported and bundled, we could ask for better handling of long-running tasks. 🙂

Banksia flower

I love the colours of this Banksia flower I saw when walking in the Australian bush. The flower head is made up of hundred of tiny individual flowers. (Ref.) Perhaps 500, or even 504? 😉

Confluence tip – speedy text formatting with keyboard shortcuts

This hint is for people who type faster than they move their mouses. Like me! It shows one of the ways of formatting text quickly (bold, italic, bullets, lists, headings) in Confluence wiki. The post could also be called “quick keys FTW”. (wink)

I’m using Confluence 4.1.9.

Keyboard shortcuts are your friend

They’re a real time saver. Click the ? on the editor toolbar to see them:

The resulting help dialog shows some of the shortcut keys:

There are more – try the usual suspects too

Most of the keyboard shortcuts will work as you expect. For example:

  • Bold text: Ctrl+B or Cmd+B
  • Italics: Ctrl+I or Cmd+I
  • Undo: Ctrl+Z or Cmd+Z

They’re described in the Confluence documentation: Keyboard shortcuts.

How to convert a bulleted list to a table in Confluence 4

This happens to me so often: I create a list on a Confluence page, and then discover that I need to add another layer of information to each item in the list. It should be a table! How can I convert it? Thank you Jay Rogers for discovering and sharing this tip.

In Confluence 4.0, to convert a bulleted list to a table:

  1. Copy the list.
  2. Paste into a Microsoft Excel spreadsheet. Excel will treat each bullet and line feed as a separate row.
  3. Select and copy the cells in Excel.
  4. Paste them into the Confluence editor. Voilà!

This trick works in Confluence 4.0, but not in Confluence 3.5. It works with Microsoft Excel, but not with a Google Docs spreadsheet, nor with a Zoho spreadsheet. It is worth trying with other spreadsheet applications, if you happen to have one lying around. Let us know what happens!

Here it is in pictures. Click the images to see an expanded screenshot. Here is a list in the Confluence 4.0 editor:

Bullets

Bullets

Copy and paste into Excel, then select the cells in Excel:

Excel

Paste into the Confluence editor:

Table

Table

%d bloggers like this: