Why can't we create 2 pages with the same name under a Space ?
Asked by seb dostie:

Hi,

Why can't we create 2 pages with the same name under a Space ? It is hard when desining a big wiki structure to know all the pages names in advance. It would be really nice that 2 pages under a different parent can have a different name.

Any guidelines about Spaces creation vs preventing same name for pages ?

Seb.


Answers:
author: Kevin Buchs
body: Seb,

Here is a more elaborate example. This creates a journal entry that is dated, has fixed string included as well as a string defined with metadata on the page.

```
{text-data:Prefix}EXPR{text-data}----h2. Create New Journal Entry{add-page:template=JournalEntry| parent=@self| prefix=%data:Prefix% Journal Entry %global:current date &gt; date:yyyy-MM-dd% }Click to add new journal entry{add-page}
```


author: Kevin Buchs
body: You can't have duplicate names because Confluence provides the wonderful capability of preserving hyperlinks to pages even when that page moves around in the space. It is keyed off of the page name. It does this by associating the name with an ugly page ID. One name to two IDs would break the system. With a hyperlink to the named page, which one would you have Confluence choose to go to?

One approach is to go wide with space creation.

Another option is to use unique prefixes to create page names, so that hierarchical names cascade down to descendents. One mechanism is to apply unique name/date/timestamped names using the {add-page} macro. So, each parent leaves his mark on his children, in a sense.

comments: author: Jim Birch
body: You need to fully specify you pages. We use prefixes. Instead of a plain "Requirements" page defined by its point in the hierarchy, we have "Microsoft Office - Requirements", "Landesk - Requirements", and so on. All the Pages under "Microsoft Office" will have the prefix.

This works well with search too.


author: seb dostie
body: Thx.

Kevin, About the unique name/date/timestamped names using the {add-page} macro. Do you mean manually put the date and time or there is an "Add-page" macro for that ? Cause I can't find that macro.

Seb.


author: seb dostie
body: found it in the plug in page..


author: Ben
body: The solution is to not use the page name as the page ID/key. They need a separate "Display Name" field.


author: antony terrence
body: @\[deleted\] The links can be constructed using the page IDs too if the Atlassian really wants to solve the problem. Link text can continue to be the titles but the actual links could be created using the topic IDs. So I don't think it's a valid reason.


author: Bob Sampson
body: I still don't understand, doesn't the Url have a unique page number?  

E.g.  
/wiki/spaces/CAUI/pages/**964312356**/Components

Why can't Confluence just have:  
/wiki/spaces/CAUI/pages/964312356

???

I don't see the point of the unique page name.

comments: author: evanbartlett
body: Came here with the same frustration. I'm trying to get my org to use confluence for meeting notes, but everyone is getting "can't create page with same name" errors. If you have a lot of people doing this, it puts a huge amount of the burden on them to constantly come up with unique names for pages. Almost makes it unusable.


author: Jim Birch
body: There's a practical benefit using real page titles in URLs.

kb.xyz.local/display/ABC/Management+and+Planning

or

kb.xyz.local/display/ABC/5467835480

It would arguably be possible to use only page IDs, include the tree, or use an ID plus the title. Note also that the system has to cope with page moves and renames. The design choices were made a long time ago and I think they were ok. Confluence offers both a flat and heirarchical page access.

The solution is to include a consistent section name in the title of all pages in a section. So *Jira - Email integration a* nd *Confluence - Email integration*are different pages and you don't have to scan past the titles to find what you want in a search.

That requires a bit of consistency work practice and perhaps education but, really, it results in better page titles. If you are getting name clashes your names aren't really specific enough, include a bit of simple hierarchy in your page titles and the problem is solved.


author: evanbartlett
body: Thanks for the context, makes total sense for documentation, it makes them better. We're trying to use it for meeting notes, so it's probably more of an outlier use case. But making people type new names so frequently adds up.


author: Johan Bergens
body: I think causes a lot of tedious work even for other things than meeting notes. We have documentation about internal systems and it quickly gets boring to write "SystemA servers", "SystemB servers", etc. It also makes it hard to change the names after.

I do understand that it is a part of the base architecture and may be very hard to change now but as a user I don't like it.


author: Helena Makarchuk
body: It is a very pity that the functionality to create pages with the same name (but, of course, with the different path) inside the space will not be implemented

comments: author: Spyros Mylonas
body: I agree with you. I have decided not to migrate from Nuclino (more expensive up to 10 users) to confluence (cheaper).


author: Jim Birch
body: The original wikis were flat page spaces joined with links, not page parent-child relationships. That gives quick unique access to any page.

As the page count goes up a hierarchical model is going to be needed to keep things under control. Confluence used a hybrid flat + hierarchical model, on a best-of-both_worlds strategy, I guess.


author: Mariano Del Rosso
body: Shameful.

comments: author: Emrah Urhan
body: Year is 2021!


author: Adam
body: Latin script can be use in subtle fashion to make titles with the same names differentiated. Looks a tiny bit odd, but definitely worth it then adding a bunch of prefixes which can make product documentation look confusing. You don't want users questions what the prefix means, as opposed to glancing at the letter D that is rendered as Latin script.

comments: author: Bob Sampson
body: Yeah I've been using emojis, but looks unprofessional.


author: Denise Unterwurzacher [Atlassian]
body: FYI, there is some thorough discussion of this issue here:

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