Always show Confluence URL in page ID format

Daisuke Niwa January 29, 2013

Hello there,

Our customer would like to configure Confluence so it always shows page URL in following format;

<Confluence Base URL>/pages/viewpage.action?pageid=<pageid>

Currently, when it contains only ASCII letters, the URL looks like

<Confluence Base URL>/display/<Space Key>/<Page Title>

but they don't want it.

Any way to achive this requirement? Please let me know.

Regards,

Daisuke Niwa

12 answers

1 accepted

3 votes
Answer accepted
RianA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 29, 2013

Hi Daisuke,

In addition to what Alex said, if you put ASCII character the link will be converted to page ID format. There are also some character that has been reserved by the URL and some characters forbidden in page titles prior to Confluence 4.1, that will be converted to Page ID format. For more information please refer to the following documentation.
* https://confluence.atlassian.com/display/CONFKB/Confluence+Page+URL's+Contain+pageId+Instead+of+The+Page+Title
* https://jira.atlassian.com/browse/CONF-2039

Hope it helps

2 votes
Arya August 23, 2013

Yeah, this would be a useful feature. It's not really a niche use case at all. A key feature of document management repositories is that every document is assigned a document ID, and users can retrieve that document by ID. I know confluence wasn't designed to compete with products like TRIM, but it's really close - it just needs to allow users to search by page ID, and the page ID needs to be visible on the page.

1 vote
Thomas Beauvais December 4, 2013

Thank you for the quick response! :)

All of that is great and makes complete sense that it's fancy, human readable and SEO increasing the ability to rank order. The use-case that I am concerned with are problems introduced by changing structure and content titles while rolling it out to users that aren't all that savvy with the platform yet.

It is far more complicated for normal users to understand that they have to go to the Tools menu or press Ctrl+K and then figure out how to paste a link directly into bookmarks instead of doing what they are used to which is either Ctrl+D (which most users don't know about) or just click the "Add to Favorites". They are very frustrated when they bookmark a page and the path is changed because someone simply corrects the title. The title and path aren't intuitively related to the normal users.

Having an administrative check box to "Always display Tiny URL" or "Always display ID based URL" would save a lot of headache and make Confluence more usable for the average user.

If the users are interested in the human readable advantages, then that is great! The default functionality should remain this way. I'm just saying, I've read a lot of threads regarding this topic and it seems like a trivial feature inclusion that would save administrators (like myself) from answering emails "RE: Why are my bookmarks broken.." to which I can only respond with "Your users aren't using Confluence correctly.."

What do you think?

Tim Smith January 22, 2014

Thomas says it perfectly. I would also like this.

Roland Kender March 24, 2014

Me also would like this option.

Dheeraj Gupta February 27, 2017

Yes, it is one of the most required options.

If this is implemented we can even program where to redirect the user, from GUI. 

This title-based URL causes many problems when there is a change in the content

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 27, 2017

It's not going to happen, I had this discussion with an Atlassian last year.  The best you're going to get is the use of the tinyurl option.

1 vote
Thomas Beauvais December 3, 2013

Coming from a technical background, this sounds crazy to me.

We are looking to migrate to Confluence for our documentation needs but it is unclear where everything will reside in the Confluence structure or what titles the pages will have. This "human readable" feature breaks bookmarks, links and emails during the movement period.

It is crazy that renaming the content page would break someone with a bookmark.

Since there is a fallback case for the l18n standard and uncodable characters such as punctuation, it wouldn't be that difficult to provide administrators (like myself) with the power to switch to the ?pageId=XXXX. Thus providing the stability for users to change the names and move content around as they see fit.

twong_atlassian
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 3, 2013

The functionality that you wish for already exists: you can already share a tiny link of your page, which is stable regardless of title change or location change. Tiny links are available by either using Tools>Link to this Page or by hitting k whilst viewing your page. The tiny url field is selected for your convenience such that you can hit k and then control-c.

Furthermore, you can always use domain.com/pages/viewpage.action?pageid=12345, if you know the pageid. It requires some foreknowledge that you can mouse over the edit link to find the pageID, but it is valid.

The reason for using the human readable urls whenever possible are manyfold:

1. Humans can read them.

2. SEO: keywords increase ranking order.

David Luke September 23, 2016

We want the option to display the "pageid" URL in the browser's URL bar.

Dheeraj Gupta February 27, 2017

Hi David Luke,

To get the Page Id in URL, you can view the target page in edit mode, copy the URL, and change the "editpage.action"?pageId=<your page id> to viewpage.action"?pageId=<your page id>.

This URL will also keep your links unbroken, even when the page title changes.

I hope, this helps. 

Regards,

@Dheeraj Gupta

 

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 27, 2017

That's not what was being asked, and has been discussed before.

A better option is also to use the tiny url, and, more importantly, when inserting links to confluence pages, to use the internal link format (of space and page name) as that follows the pages when they're moved and renamed.

1 vote
twong_atlassian
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 1, 2013

Hi Daisuke:

I've created you a jira request here:

https://jira.atlassian.com/browse/CONF-27966

I also submitted a working patch for confluence 4.3.6. This is untested in the large scale, but tested in the small scale.

Tim

Daisuke Niwa February 3, 2013

Tim,

Thanks for your great help!

Regards,

Daisuke Niwa

1 vote
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 29, 2013

Not really. Confluence serves up it's page names in a human-friendly view where it can. You would need to do some significant coding in the core of Confluence to tell it to be less friendly, or try to rewrite any outgoing urls as they go out through Apache (or other web server)

Daisuke Niwa January 29, 2013

Nic,

Is it possible for you to give a rough idea about " rewrite any outgoing urls as they go out through Apache" part?

Thanks.


Daisuke Niwa January 31, 2013

Thanks! Will have a look at it.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 31, 2013
0 votes
Gustavo Santos December 12, 2014

Hi,

There is a way to do it. You need to disable the atlassian pretty urls plugin.

See more here:

 

Tim_ Smith December 12, 2014

I just tried disabling this on my 5.4.2 instance and it had no effect on existing or newly created pages. Tired restarting the software and re-testing...still nothing. Any trick to this?

0 votes
John Pisani May 10, 2013
Hi Tim, The reason is that links back to Confluence placed in our external systems have the risk of breaking when someone reconsiders how the target article is named. As I think I mentioned in the Jira comments, I know this can be done by grabbing the tiny URL from the info page bit that's a bit more complex for my wider user base and we're trying to drive adoption
twong_atlassian
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 12, 2013

Well, you could do the above (implement my patch), or you could do something a little less impactful.

You could distribute a bookmarklet that does something like this:

javascript:(function(){window.location=AJS.$('#editPageLink').attr('href').replace('edit','view') ; })();

That would mean someone could click their bookmark in browser, and it would change the page automatically to the viewpage style. Or, you could inject a button on your own using some jquery to the page. Or you could make the bookmarklet automagically copy a linky to their clipboard (this is easier said than done, as there isn't a great way to do this w/o flash).

Lots of possibilities exist.

0 votes
John Pisani May 9, 2013

If we can in anyway +1 this for mainstream release, it would be very helpful to the way we do things

twong_atlassian
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 9, 2013

I'm afraid that probably won't happen. This is kind of a niche use case. Out of curiosity, why would doing it by ID be better for your usecase?

0 votes
Daisuke Niwa January 31, 2013

Hello Tim,

It's Confluence 4.3.6

0 votes
twong_atlassian
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 31, 2013

What version?

0 votes
Alejandro Conde Carrillo
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 29, 2013

As a workaround, you could include a non ascii character in all page titles to force Confluence to use the id instead of the page title.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events